cwconfig.py
brancholdstable
changeset 7178 a62f24e1497e
parent 7086 0d63937991a5
child 7179 00548a4b22a6
equal deleted inserted replaced
7106:63f0bc280354 7178:a62f24e1497e
   137 _ = unicode
   137 _ = unicode
   138 
   138 
   139 import sys
   139 import sys
   140 import os
   140 import os
   141 import logging
   141 import logging
       
   142 import logging.config
   142 from smtplib import SMTP
   143 from smtplib import SMTP
   143 from threading import Lock
   144 from threading import Lock
   144 from os.path import (exists, join, expanduser, abspath, normpath,
   145 from os.path import (exists, join, expanduser, abspath, normpath,
   145                      basename, isdir, dirname, splitext)
   146                      basename, isdir, dirname, splitext)
   146 from warnings import warn
   147 from warnings import warn
  1096         super_self = super(CubicWebConfiguration, self)
  1097         super_self = super(CubicWebConfiguration, self)
  1097         super_self.init_log(logthreshold, logfile=self.get('log-file'))
  1098         super_self.init_log(logthreshold, logfile=self.get('log-file'))
  1098         # read a config file if it exists
  1099         # read a config file if it exists
  1099         logconfig = join(self.apphome, 'logging.conf')
  1100         logconfig = join(self.apphome, 'logging.conf')
  1100         if exists(logconfig):
  1101         if exists(logconfig):
  1101             logging.fileConfig(logconfig)
  1102             logging.config.fileConfig(logconfig)
  1102 
  1103 
  1103     def available_languages(self, *args):
  1104     def available_languages(self, *args):
  1104         """return available translation for an instance, by looking for
  1105         """return available translation for an instance, by looking for
  1105         compiled catalog
  1106         compiled catalog
  1106 
  1107