equal
deleted
inserted
replaced
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 |