Correct simple loging

This commit is contained in:
Stephan Porada 2019-09-11 15:52:38 +02:00
parent dd7ef2a113
commit 3accc058e3
6 changed files with 5 additions and 6 deletions

View File

@ -18,7 +18,7 @@ WORKDIR /home/opaque
COPY app app
copy migrations migrations
COPY migrations migrations
COPY config.py opaque.py requirements.txt ./
RUN python -m venv venv && \
venv/bin/pip install -r requirements.txt

View File

@ -1,2 +0,0 @@
2019-09-11 12:48:21 - WARNING - werkzeug - _internal.py - 122 - * Debugger is active!
2019-09-11 12:48:21 - INFO - werkzeug - _internal.py - 122 - * Debugger PIN: 140-241-697

View File

View File

View File

@ -36,9 +36,9 @@ class DevelopmentConfig(Config):
os.environ.get('POSTGRES_PASSWORD'),
os.environ.get('POSTGRES_DB_NAME')
)
log_format = "%(asctime)s - %(levelname)s - %(name)s - "\
"%(filename)s - %(lineno)d - %(message)s"
logging.basicConfig(filename='app/logs/main.log', level='WARNING',
log_format = ("%(asctime)s - %(levelname)s - %(name)s - "
"%(filename)s - %(lineno)d - %(message)s")
logging.basicConfig(filename='app/logs/opaque_flask.log', level='WARNING',
format=log_format, datefmt='%Y-%m-%d %H:%M:%S',
filemode='w')

View File

@ -32,6 +32,7 @@ services:
image: gitlab.ub.uni-bielefeld.de:4567/sfb1288inf/opaque_daemon:latest
volumes:
- $HOME/.docker/config.json:/home/opaque_daemon/.docker/config.json
- ./app/logs/opaque_daemon.log:/home/opaque_daemon/logs/opaque_daemon.log
db:
deploy:
placement: