Have builder follow the logging configuration
Also fixes a few lint errors
This commit is contained in:
parent
c1cff32c1e
commit
d2476c9187
1 changed files with 5 additions and 3 deletions
|
@ -1,10 +1,12 @@
|
|||
import logging
|
||||
import os
|
||||
import features
|
||||
import time
|
||||
import socket
|
||||
|
||||
import features
|
||||
|
||||
from app import app, userfiles as user_files, build_logs, dockerfile_build_queue
|
||||
from util.log import logfile_path
|
||||
|
||||
from buildman.manager.enterprise import EnterpriseManager
|
||||
from buildman.manager.ephemeral import EphemeralBuilderManager
|
||||
|
@ -77,13 +79,13 @@ def run_build_manager():
|
|||
server.run('0.0.0.0', websocket_port, controller_port, ssl=ssl_context)
|
||||
|
||||
if __name__ == '__main__':
|
||||
logging.basicConfig(level=logging.DEBUG, format=LOG_FORMAT)
|
||||
logging.config.fileConfig(logfile_path(debug=True), disable_existing_loggers=False)
|
||||
logging.getLogger('peewee').setLevel(logging.WARN)
|
||||
logging.getLogger('boto').setLevel(logging.WARN)
|
||||
|
||||
if app.config.get('EXCEPTION_LOG_TYPE', 'FakeSentry') == 'Sentry':
|
||||
buildman_name = '%s:buildman' % socket.gethostname()
|
||||
setup_logging(SentryHandler(app.config.get('SENTRY_DSN', ''), name=buildman_name,
|
||||
level=logging.ERROR))
|
||||
level=logging.ERROR))
|
||||
|
||||
run_build_manager()
|
||||
|
|
Reference in a new issue