Created
September 20, 2016 10:01
-
-
Save timitos/f74e5c6b5c75064f9c9d2417f23e6cad to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import logging | |
import logging.config | |
from trytond.config import config | |
from trytond.application import app | |
logconf = os.environ.get('TRYTOND_LOGCONF') | |
if logconf: | |
logging.config.fileConfig(logconf) | |
logging.getLogger('server').info('using %s as logging ' | |
'configuration file', logconf) | |
else: | |
logformat = ('%(process)s %(thread)s [%(asctime)s] ' | |
'%(levelname)s %(name)s %(message)s') | |
level = logging.ERROR | |
logging.basicConfig(level=level, format=logformat) | |
logging.captureWarnings(True) | |
config.update_etc() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment