This commit is contained in:
Lincoln Stein 2023-08-14 20:20:35 -04:00
parent cab8239ba8
commit 09ef57718e

View File

@ -1,7 +1,6 @@
# Copyright (c) 2023 Lincoln D. Stein and The InvokeAI Development Team # Copyright (c) 2023 Lincoln D. Stein and The InvokeAI Development Team
""" """invokeai.backend.util.logging
invokeai.backend.util.logging
Logging class for InvokeAI that produces console messages Logging class for InvokeAI that produces console messages
@ -40,7 +39,10 @@ object:
config = InvokeAIAppConfig.get_config() config = InvokeAIAppConfig.get_config()
config.parse_args() config.parse_args()
logger = InvokeAILogger.getLogger(config=config) logger = InvokeAILogger.get_logger(config=config)
For backward compatibility, getLogger() is an alias for get_logger(),
but without the camel case.
### Three command-line options control logging: ### Three command-line options control logging:
@ -173,6 +175,7 @@ InvokeAI:
log_level: info log_level: info
log_format: color log_format: color
``` ```
""" """
import logging.handlers import logging.handlers
@ -228,6 +231,7 @@ def basicConfig(**kwargs):
def getLogger(name: str = None) -> logging.Logger: def getLogger(name: str = None) -> logging.Logger:
return InvokeAILogger.getLogger(name) return InvokeAILogger.getLogger(name)
_FACILITY_MAP = ( _FACILITY_MAP = (
dict( dict(
LOG_KERN=syslog.LOG_KERN, LOG_KERN=syslog.LOG_KERN,