improve wallet server log format

This commit is contained in:
Jack Robison 2019-11-01 13:32:40 -04:00
parent 3c4574f11f
commit 9376e092c4
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -68,6 +68,11 @@ class Server:
def __init__(self, env):
self.env = env
self.log = logging.getLogger(__name__).getChild(self.__class__.__name__)
console_handler = logging.StreamHandler()
console_handler.setFormatter(
logging.Formatter("%(asctime)s %(levelname)-8s %(name)s:%(lineno)d: %(message)s")
)
self.log.addHandler(console_handler)
if self.env.loggly_token:
self.log.addHandler(get_loggly_handler('wallet-server', self.env.loggly_token))
self.shutdown_event = asyncio.Event()