Skip to content

Commit

Permalink
move logger to be initialized before self call. Fixes #138
Browse files Browse the repository at this point in the history
  • Loading branch information
dirtycajunrice committed Jun 18, 2019
1 parent ea658b9 commit fb67f5a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion varken/dbmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
class DBManager(object):
def __init__(self, server):
self.server = server
self.logger = getLogger()
if self.server.url == "influxdb.domain.tld":
self.logger.critical("You have not configured your varken.ini. Please read Wiki page for configuration")
exit()
self.influx = InfluxDBClient(host=self.server.url, port=self.server.port, username=self.server.username,
password=self.server.password, ssl=self.server.ssl, database='varken',
verify_ssl=self.server.verify_ssl)
self.logger = getLogger()
try:
version = self.influx.request('ping', expected_response_code=204).headers['X-Influxdb-Version']
self.logger.info('Influxdb version: %s', version)
Expand Down

0 comments on commit fb67f5a

Please sign in to comment.