File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -229,7 +229,7 @@ messages should not. Here's how you can achieve this::
229229 # tell the handler to use this format
230230 console.setFormatter(formatter)
231231 # add the handler to the root logger
232- logging.getLogger('' ).addHandler(console)
232+ logging.getLogger().addHandler(console)
233233
234234 # Now, we can log to the root logger, or any other logger. First the root...
235235 logging.info('Jackdaws love my big sphinx of quartz.')
@@ -650,7 +650,7 @@ the receiving end. A simple way of doing this is attaching a
650650
651651 import logging, logging.handlers
652652
653- rootLogger = logging.getLogger('' )
653+ rootLogger = logging.getLogger()
654654 rootLogger.setLevel(logging.DEBUG)
655655 socketHandler = logging.handlers.SocketHandler('localhost',
656656 logging.handlers.DEFAULT_TCP_LOGGING_PORT)
You can’t perform that action at this time.
0 commit comments