mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
partially address --root CLI argument handling
- fix places where `get_config()` is being called at import time rather than at run time. - add regression test for import time get_config() calling.
This commit is contained in:
committed by
psychedelicious
parent
8cd65755ef
commit
d871fca643
@ -339,7 +339,8 @@ class InvokeAILogger(object): # noqa D102
|
||||
loggers: Dict[str, logging.Logger] = {}
|
||||
|
||||
@classmethod
|
||||
def get_logger(cls, name: str = "InvokeAI", config: InvokeAIAppConfig = get_config()) -> logging.Logger: # noqa D102
|
||||
def get_logger(cls, name: str = "InvokeAI", config: Optional[InvokeAIAppConfig] = None) -> logging.Logger: # noqa D102
|
||||
config = config or get_config()
|
||||
if name in cls.loggers:
|
||||
return cls.loggers[name]
|
||||
|
||||
|
Reference in New Issue
Block a user