Skip to content

Commit

Permalink
Never use root logger to allow filtering zappa logs with greater ease (
Browse files Browse the repository at this point in the history
…#1277)

Co-authored-by: Gautier Pelloux <[email protected]>
Co-authored-by: javulticat <[email protected]>
  • Loading branch information
3 people authored Nov 6, 2023
1 parent 3cbe342 commit 35af3cd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion zappa/handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

# Set up logging
logging.basicConfig()
logger = logging.getLogger()
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)


Expand Down
2 changes: 1 addition & 1 deletion zappa/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def common_log(environ, response, response_time: Optional[int] = None):
response_time: response time in micro-seconds
"""

logger = logging.getLogger()
logger = logging.getLogger(__name__)

if response_time:
formatter = ApacheNCSAFormatter(with_response_time=True)
Expand Down

0 comments on commit 35af3cd

Please sign in to comment.