Allow for custom logger to be passed to ApplicationSession
See original GitHub issueApplicationSession does not currently allow a custom logger to be passed to the logger instance that txaio uses. It would be nice to allow a custom logger to be passed based on the standard lib logging module. This would allow for better control of a log file for administration, and not duplicate entry with no way to stop it:
[04-28-2016 15:58:32.589 UTC] PID: 1659 Mod: timer Line: 16 INFO: build_json_tree sort finished in: 0.002349 secs
2016-04-28T11:58:32 build_json_tree sort finished in: 0.002349 secs
class ApplicationSession(BaseSession):
"""
WAMP endpoint session.
"""
log = txaio.make_logger() or self.config.logger # NOTE: Or something like this
def __init__(self, config=None):
"""
Constructor.
"""
BaseSession.__init__(self)
self.config = config or types.ComponentConfig(realm=u"default")
class SessionComponent(ApplicationSession):
def __init__(self, config=None, hostname=None, logger=None):
ApplicationSession.__init__(self, config, logger)
Issue Analytics
- State:
- Created 7 years ago
- Comments:27 (12 by maintainers)
Top Results From Across the Web
Logging Cookbook — Python 3.11.1 documentation
Filter instances are allowed to modify the LogRecords passed to them, including adding additional attributes which can then be output using a suitable...
Read more >Node.js Logging with Winston - Reflectoring
Introducing Node Js Developers to Logging Using Winston Loggers. ... Its formatting feature allows us to customize logged messages.
Read more >Python logging: access custom logger from several files
How can I declare a custom logger with custom logging method in the main.py and then use the same object (!) in all...
Read more >Application Session Management - Auth0
Let's see how to maintain application sessions in different scenarios. ... Application Session Layer Logout: Logging users out of your ...
Read more >openid logout
Develop scalable, custom business apps with low-code development or give your ... your application session and also the session of Azure AD gets...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No
Ah 😉