ソースを参照

Resolve logging configuration file when logging is started

Felix Lange 12 年 前
コミット
ada23997a9
1 ファイル変更4 行追加4 行削除
  1. 4 4
      radicale/log.py

+ 4 - 4
radicale/log.py

@@ -33,14 +33,14 @@ from . import config
 
 
 LOGGER = logging.getLogger()
-FILENAME = os.path.expanduser(config.get("logging", "config"))
-
 
 def start():
+    filename = os.path.expanduser(config.get("logging", "config"))
+
     """Start the logging according to the configuration."""
-    if os.path.exists(FILENAME):
+    if os.path.exists(filename):
         # Configuration taken from file
-        logging.config.fileConfig(FILENAME)
+        logging.config.fileConfig(filename)
     else:
         # Default configuration, standard output
         handler = logging.StreamHandler(sys.stdout)