Skip to content

Commit 749f866

Browse files
Use a statically allocated logger by default
1 parent 6ba131a commit 749f866

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

socketio/server.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
from . import packet
88
from . import namespace
99

10+
default_logger = logging.getLogger('socketio')
11+
1012

1113
class Server(object):
1214
"""A Socket.IO server.
@@ -92,7 +94,7 @@ def __init__(self, client_manager=None, logger=False, binary=False,
9294
if not isinstance(logger, bool):
9395
self.logger = logger
9496
else:
95-
self.logger = logging.getLogger('socketio')
97+
self.logger = default_logger
9698
if not logging.root.handlers and \
9799
self.logger.level == logging.NOTSET:
98100
if logger:

0 commit comments

Comments
 (0)