forked from clan/clan-core
Merge pull request 'revert logger changes in f7c6ab5888c5763c1ec5e4326f452946d915b1f6' (#720) from Mic92-HEAD into main
This commit is contained in:
commit
30c7d61bbd
@ -63,18 +63,11 @@ def get_caller() -> str:
|
||||
|
||||
|
||||
def setup_logging(level: Any) -> None:
|
||||
# Get the root logger and set its level
|
||||
root_logger = logging.getLogger()
|
||||
root_logger.setLevel(level)
|
||||
|
||||
# Create and add the default handler
|
||||
default_handler = logging.StreamHandler()
|
||||
|
||||
# Create and add your custom handler
|
||||
default_handler.setLevel(level)
|
||||
default_handler.setFormatter(CustomFormatter())
|
||||
root_logger.addHandler(default_handler)
|
||||
|
||||
# Set logging level for other modules used by this module
|
||||
handler = logging.StreamHandler()
|
||||
handler.setLevel(level)
|
||||
handler.setFormatter(CustomFormatter())
|
||||
logger = logging.getLogger("registerHandler")
|
||||
logging.getLogger("asyncio").setLevel(logging.INFO)
|
||||
logging.getLogger("httpx").setLevel(level=logging.WARNING)
|
||||
logger.addHandler(handler)
|
||||
# logging.basicConfig(level=level, handlers=[handler])
|
||||
|
Loading…
Reference in New Issue
Block a user