mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Unifies logging through the testing process. Requires adding a Galaxy option to disable its own attempts to configure a different root logger.
18 lines
512 B
Python
18 lines
512 B
Python
from __future__ import absolute_import
|
|
|
|
import os
|
|
|
|
import logging
|
|
import logging.config
|
|
|
|
# This is done in paster or galaxy.main for server app, provide
|
|
# an entry point testing as well.
|
|
logging_config = os.environ.get("GALAXY_TEST_LOGGING_CONFIG", None)
|
|
logging_config_file = None
|
|
if logging_config:
|
|
logging_config_file = os.path.abspath(logging_config)
|
|
logging.config.fileConfig(
|
|
logging_config_file,
|
|
dict(__file__=logging_config_file, here=os.path.dirname(logging_config_file)),
|
|
)
|