Changes to logging tautulli
This commit is contained in:
parent
91dd3975b7
commit
50c1be7e41
1 changed files with 3 additions and 3 deletions
|
@ -1,11 +1,13 @@
|
||||||
|
import logging
|
||||||
from datetime import datetime, timezone
|
from datetime import datetime, timezone
|
||||||
from geoip2.errors import AddressNotFoundError
|
from geoip2.errors import AddressNotFoundError
|
||||||
from requests import Session, Request
|
from requests import Session, Request
|
||||||
|
|
||||||
from varken.logger import logging
|
|
||||||
from varken.helpers import geo_lookup, hashit, connection_handler
|
from varken.helpers import geo_lookup, hashit, connection_handler
|
||||||
from varken.structures import TautulliStream
|
from varken.structures import TautulliStream
|
||||||
|
|
||||||
|
logger = logging.getLogger()
|
||||||
|
|
||||||
|
|
||||||
class TautulliAPI(object):
|
class TautulliAPI(object):
|
||||||
def __init__(self, server, dbmanager):
|
def __init__(self, server, dbmanager):
|
||||||
|
@ -17,7 +19,6 @@ class TautulliAPI(object):
|
||||||
self.session.params['apikey'] = self.server.api_key
|
self.session.params['apikey'] = self.server.api_key
|
||||||
self.endpoint = '/api/v2'
|
self.endpoint = '/api/v2'
|
||||||
|
|
||||||
@logging
|
|
||||||
def get_activity(self):
|
def get_activity(self):
|
||||||
self.now = datetime.now(timezone.utc).astimezone().isoformat()
|
self.now = datetime.now(timezone.utc).astimezone().isoformat()
|
||||||
params = {'cmd': 'get_activity'}
|
params = {'cmd': 'get_activity'}
|
||||||
|
@ -53,7 +54,6 @@ class TautulliAPI(object):
|
||||||
|
|
||||||
self.dbmanager.write_points(influx_payload)
|
self.dbmanager.write_points(influx_payload)
|
||||||
|
|
||||||
@logging
|
|
||||||
def get_sessions(self):
|
def get_sessions(self):
|
||||||
self.now = datetime.now(timezone.utc).astimezone().isoformat()
|
self.now = datetime.now(timezone.utc).astimezone().isoformat()
|
||||||
params = {'cmd': 'get_activity'}
|
params = {'cmd': 'get_activity'}
|
||||||
|
|
Loading…
Reference in a new issue