mirror of
https://github.com/jlu5/PyLink.git
synced 2024-11-24 03:29:28 +01:00
log: use pylinkirc as logger name
This commit is contained in:
parent
4f17a7986b
commit
190e51211f
@ -737,6 +737,7 @@ class PyLinkNetworkCoreWithUtils(PyLinkNetworkCore):
|
|||||||
text = text.replace('~', '^')
|
text = text.replace('~', '^')
|
||||||
# Encode the text as bytes first, and then lowercase it so that only ASCII characters are
|
# 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!
|
# 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()
|
return text.encode().lower().decode()
|
||||||
|
|
||||||
_NICK_REGEX = r'^[A-Za-z\|\\_\[\]\{\}\^\`][A-Z0-9a-z\-\|\\_\[\]\{\}\^\`]*$'
|
_NICK_REGEX = r'^[A-Za-z\|\\_\[\]\{\}\^\`][A-Z0-9a-z\-\|\\_\[\]\{\}\^\`]*$'
|
||||||
|
2
log.py
2
log.py
@ -35,7 +35,7 @@ world.console_handler.setFormatter(logformatter)
|
|||||||
world.console_handler.setLevel(_get_console_log_level())
|
world.console_handler.setLevel(_get_console_log_level())
|
||||||
|
|
||||||
# Get the main logger object; plugins can import this variable for convenience.
|
# Get the main logger object; plugins can import this variable for convenience.
|
||||||
log = logging.getLogger()
|
log = logging.getLogger('pylinkirc')
|
||||||
log.addHandler(world.console_handler)
|
log.addHandler(world.console_handler)
|
||||||
|
|
||||||
# This is confusing, but we have to set the root logger to accept all events. Only this way
|
# This is confusing, but we have to set the root logger to accept all events. Only this way
|
||||||
|
Loading…
Reference in New Issue
Block a user