From 190e51211fe088f7371e33204334f6ffb56c510b Mon Sep 17 00:00:00 2001 From: James Lu Date: Wed, 20 Feb 2019 13:22:01 -0800 Subject: [PATCH] log: use pylinkirc as logger name --- classes.py | 1 + log.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/classes.py b/classes.py index 3bbe7c0..8a2aa57 100644 --- a/classes.py +++ b/classes.py @@ -737,6 +737,7 @@ class PyLinkNetworkCoreWithUtils(PyLinkNetworkCore): text = text.replace('~', '^') # Encode the text as bytes first, and then lowercase it so that only ASCII characters are # changed. Unicode in channel names, etc. *is* case sensitive! + # Interesting, a quick emperical test found that this method is actually faster than str.translate()?! return text.encode().lower().decode() _NICK_REGEX = r'^[A-Za-z\|\\_\[\]\{\}\^\`][A-Z0-9a-z\-\|\\_\[\]\{\}\^\`]*$' diff --git a/log.py b/log.py index 4a01976..11b5e43 100644 --- a/log.py +++ b/log.py @@ -35,7 +35,7 @@ world.console_handler.setFormatter(logformatter) world.console_handler.setLevel(_get_console_log_level()) # Get the main logger object; plugins can import this variable for convenience. -log = logging.getLogger() +log = logging.getLogger('pylinkirc') log.addHandler(world.console_handler) # This is confusing, but we have to set the root logger to accept all events. Only this way