Skip to content

Commit

Permalink
Write access/error logs to stderr
Browse files Browse the repository at this point in the history
Our logs are utterly quite, let's make sure we also write access/error
logs to stderr and not only the tracebacks for unhandled exceptions.
  • Loading branch information
malor authored and ikalnytskyi committed Jan 8, 2018
1 parent 94ad81d commit 523ac61
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions xsnippet/api/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
:license: MIT, see LICENSE for details
"""

import logging
import os
import sys

Expand All @@ -19,6 +20,10 @@


def main(args=sys.argv[1:]):
# write access/error logs to stderr
logging.basicConfig()
logging.getLogger('aiohttp').setLevel(logging.INFO)

conf = get_conf([
os.path.join(os.path.dirname(__file__), 'default.conf'),
], envvar='XSNIPPET_API_SETTINGS')
Expand Down

0 comments on commit 523ac61

Please sign in to comment.