mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
add get_logger() as alias for getLogger()
This commit is contained in:
parent
6eaaa75a5d
commit
cab8239ba8
@ -228,7 +228,6 @@ 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,
|
||||||
@ -366,6 +365,11 @@ class InvokeAILogger(object):
|
|||||||
cls.loggers[name] = logger
|
cls.loggers[name] = logger
|
||||||
return cls.loggers[name]
|
return cls.loggers[name]
|
||||||
|
|
||||||
|
# same thing without the camel case
|
||||||
|
@classmethod
|
||||||
|
def get_logger(cls, *arg, **kwarg) -> logging.Logger:
|
||||||
|
return cls.getLogger(*arg, **kwarg)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def getLoggers(cls, config: InvokeAIAppConfig) -> list[logging.Handler]:
|
def getLoggers(cls, config: InvokeAIAppConfig) -> list[logging.Handler]:
|
||||||
handler_strs = config.log_handlers
|
handler_strs = config.log_handlers
|
||||||
|
Loading…
Reference in New Issue
Block a user