remove unused parameters

This commit is contained in:
Victor Shyba 2020-02-20 14:35:57 -03:00
parent fc5d5faaed
commit 7c160ff65e

View file

@ -38,22 +38,19 @@ class JsonFormatter(logging.Formatter):
class HTTPSLogglyHandler(logging.Handler): class HTTPSLogglyHandler(logging.Handler):
def __init__(self, loggly_token: str, fqdn=False, localname=None, facility=None, cookies=None, config=None): def __init__(self, loggly_token: str, config: 'Config'):
super().__init__() super().__init__()
self.fqdn = fqdn self.cookies = {}
self.localname = localname
self.facility = facility
self.cookies = cookies or {}
self.url = "https://logs-01.loggly.com/inputs/{token}/tag/{tag}".format( self.url = "https://logs-01.loggly.com/inputs/{token}/tag/{tag}".format(
token=utils.deobfuscate(loggly_token), tag='lbrynet-' + __version__ token=utils.deobfuscate(loggly_token), tag='lbrynet-' + __version__
) )
self._loop = asyncio.get_event_loop() self._loop = asyncio.get_event_loop()
self._session = aiohttp.ClientSession() self._session = aiohttp.ClientSession()
self._config: typing.Optional['Config'] = config self._config = config
@property @property
def enabled(self): def enabled(self):
return self._config and self._config.share_usage_data return self._config.share_usage_data
@staticmethod @staticmethod
def get_full_message(record): def get_full_message(record):