log fix
This commit is contained in:
BIN
RUSAL_ROOT.cer
Normal file
BIN
RUSAL_ROOT.cer
Normal file
Binary file not shown.
@@ -21,7 +21,7 @@ if "DATABASE_URL" in os.environ:
|
||||
# Interpret the config file for Python logging.
|
||||
# This line sets up loggers basically.
|
||||
if config.config_file_name is not None:
|
||||
fileConfig(config.config_file_name)
|
||||
fileConfig(config.config_file_name, disable_existing_loggers=False)
|
||||
|
||||
# add your model's MetaData object here
|
||||
# for 'autogenerate' support
|
||||
|
||||
@@ -205,6 +205,12 @@ def configure_logger(config):
|
||||
cot_handler = logging.StreamHandler()
|
||||
cot_handler.setFormatter(CotJsonFormatter())
|
||||
cot_logger.addHandler(cot_handler)
|
||||
|
||||
# Disable propagation to prevent duplicate output via uvicorn's root logger handlers.
|
||||
# Both loggers have their own dedicated handlers; propagation would cause each message
|
||||
# to appear twice: once via CotJsonFormatter (JSON) and once via uvicorn's DefaultFormatter (text).
|
||||
logger.propagate = False
|
||||
cot_logger.propagate = False
|
||||
# #endregion configure_logger
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user