{"action":"closed","issue":{"url":"https://api.github.com/repos/crossbario/autobahn-python/issues/655","repository_url":"https://api.github.com/repos/crossbario/autobahn-python","labels_url":"https://api.github.com/repos/crossbario/autobahn-python/issues/655/labels{/name}","comments_url":"https://api.github.com/repos/crossbario/autobahn-python/issues/655/comments","events_url":"https://api.github.com/repos/crossbario/autobahn-python/issues/655/events","html_url":"https://github.com/crossbario/autobahn-python/issues/655","id":151688240,"number":655,"title":"Allow for custom logger to be passed to ApplicationSession","user":{"login":"singlecheeze","id":12156213,"avatar_url":"https://avatars.githubusercontent.com/u/12156213?v=3","gravatar_id":"","url":"https://api.github.com/users/singlecheeze","html_url":"https://github.com/singlecheeze","followers_url":"https://api.github.com/users/singlecheeze/followers","following_url":"https://api.github.com/users/singlecheeze/following{/other_user}","gists_url":"https://api.github.com/users/singlecheeze/gists{/gist_id}","starred_url":"https://api.github.com/users/singlecheeze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/singlecheeze/subscriptions","organizations_url":"https://api.github.com/users/singlecheeze/orgs","repos_url":"https://api.github.com/users/singlecheeze/repos","events_url":"https://api.github.com/users/singlecheeze/events{/privacy}","received_events_url":"https://api.github.com/users/singlecheeze/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2016-04-28T16:34:42Z","updated_at":"2016-04-29T20:43:28Z","closed_at":"2016-04-29T20:43:28Z","body":"ApplicationSession 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:\r\n\r\n``` text\r\n[04-28-2016 15:58:32.589 UTC] PID: 1659 Mod: timer Line: 16 INFO: build_json_tree sort finished in: 0.002349 secs\r\n2016-04-28T11:58:32 build_json_tree sort finished in: 0.002349 secs\r\n``` \r\n\r\n``` python\r\nclass ApplicationSession(BaseSession):\r\n    \"\"\"\r\n    WAMP endpoint session.\r\n    \"\"\"\r\n\r\n    log = txaio.make_logger() or self.config.logger  # NOTE: Or something like this\r\n\r\n    def __init__(self, config=None):\r\n        \"\"\"\r\n        Constructor.\r\n        \"\"\"\r\n        BaseSession.__init__(self)\r\n        self.config = config or types.ComponentConfig(realm=u\"default\")\r\n```\r\n\r\n``` python\r\nclass SessionComponent(ApplicationSession):\r\n    def __init__(self, config=None, hostname=None, logger=None):\r\n        ApplicationSession.__init__(self, config, logger)\r\n```"}}