3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-24 19:52:53 +01:00

log: use pylinkirc as logger name

This commit is contained in:
James Lu 2019-02-20 13:22:01 -08:00
parent 4f17a7986b
commit 190e51211f
2 changed files with 2 additions and 1 deletions

View File

@ -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\-\|\\_\[\]\{\}\^\`]*$'

2
log.py
View File

@ -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