Skip to content

Commit

Permalink
log changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ksanislo committed Dec 25, 2018
1 parent 1386e6c commit 1cdb416
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tcc-exporter
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import urllib.request
from http.server import HTTPServer, BaseHTTPRequestHandler
from urllib.error import HTTPError

VERSION = '0.8.11'
VERSION = '0.8.12'
PREFIX = 'https://mytotalconnectcomfort.com/'
devices = list()

Expand Down Expand Up @@ -221,12 +221,13 @@ def main():
except Exception as e:
log('CRITICAL', '{0} {1}: {2!r}'.format(inspect.currentframe().f_code.co_name, type(e).__name__, e.args))
return
httpd = HTTPServer(('', int(os.environ.get('TCC_EXPORTER_PORT'))), Server)
log('DEBUG', 'Starting HTTP server on port {0}'.format(os.environ.get('TCC_EXPORTER_PORT')))
server_address=('0.0.0.0', int(os.environ.get('TCC_EXPORTER_PORT')))
httpd = HTTPServer(server_address, Server)
log('DEBUG', 'Starting server: http://{0}:{1}'.format(server_address[0], server_address[1]))
httpd.serve_forever()


if __name__ == '__main__':
log('INFO', 'Started tcc-exporter/'+VERSION)
log('INFO', 'tcc-exporter/{0}'.format(VERSION))
main()

0 comments on commit 1cdb416

Please sign in to comment.