Commits

Anonymous committed 913cbdf

include special here and __file__ defaults for fileConfig, similar to
PasteDeploy configs

  • Participants
  • Parent commits aa6a950

Comments (0)

Files changed (2)

File docs/news.txt

 
 .. contents::
 
+1.7.4
+-----
+
+* Include special ``here`` and ``__file__`` default vars for logging
+  config files, similar to PasteDeploy config loading.
+
 1.7.3
 -----
 

File paste/script/command.py

         """
         Setup logging via the logging module's fileConfig function with the
         specified ``config_file``, if applicable.
+
+        ConfigParser defaults are specified for the special ``__file__``
+        and ``here`` variables, similar to PasteDeploy config loading.
         """
         parser = ConfigParser.ConfigParser()
         parser.read([config_file])
         if parser.has_section('loggers'):
-            fileConfig(config_file)
+            config_file = os.path.abspath(config_file)
+            fileConfig(config_file, dict(__file__=config_file,
+                                         here=os.path.dirname(config_file)))
 
 class NotFoundCommand(Command):