Closed tomuben closed 1 year ago
Code snippet:
logging.basicConfig(
format='%(asctime)s %(levelname)-8s %(message)s',
level=logging.INFO,
datefmt='%Y-%m-%d %H:%M:%S')
self.environment_info, self.clean_up = \
spawn_test_environment(environment_name="saasd_integration_tests",
database_port_forward=self.database_port,
bucketfs_port_forward=bucketfs_port)
logging.info("This log gets printed to .build_output/jobs/logs/main.log, but not to stdout as expeccted")
After first investigation, we know that luigi calls logging.config.fileConfig(opts.logging_conf_file, disable_existing_loggers=False)
in the setup_logging.py
. The fileConfig call will keep all existing loggers, except the root logger which needs to be defined in the config file. This means the config of the root-loggers gets forgotten.
We decided to solve this problem using two strategies.
Closed with #296
Steps to reproduce
itde
from a client applicationspawn_test_environment
/spawn_test_environment_with_test_container
log something.build_output/jobs/logs/main.log
RCA
root
log channelitde
:luigi
andluigi-interface
, and notroot