mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
clean up get_logger() call
This commit is contained in:
parent
bdb0d13a2d
commit
3c7d1fcd32
@ -141,7 +141,7 @@ async def del_model_record(
|
||||
status_code=201,
|
||||
)
|
||||
async def add_model_record(
|
||||
config: Annotated[AnyModelConfig, Body(description="Model config", discriminator="type")]
|
||||
config: Annotated[AnyModelConfig, Body(description="Model config", discriminator="type")],
|
||||
) -> AnyModelConfig:
|
||||
"""
|
||||
Add a model using the configuration information appropriate for its type.
|
||||
|
@ -343,12 +343,12 @@ class InvokeAILogger(object): # noqa D102
|
||||
) -> logging.Logger: # noqa D102
|
||||
if name in cls.loggers:
|
||||
return cls.loggers[name]
|
||||
else:
|
||||
logger = logging.getLogger(name)
|
||||
|
||||
logger = logging.getLogger(name)
|
||||
logger.setLevel(config.log_level.upper()) # yes, strings work here
|
||||
for ch in cls.get_loggers(config):
|
||||
logger.addHandler(ch)
|
||||
cls.loggers[name] = logger
|
||||
cls.loggers[name] = logger
|
||||
return cls.loggers[name]
|
||||
|
||||
@classmethod
|
||||
|
Loading…
Reference in New Issue
Block a user