Skip to content
This repository has been archived by the owner on Oct 10, 2019. It is now read-only.

Commit

Permalink
Merge pull request #58 from automationator/master
Browse files Browse the repository at this point in the history
Removes logging to files
  • Loading branch information
automationator committed May 1, 2019
2 parents 1f7560d + 541e3d8 commit 11c5354
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions services/web/project/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import logging
from logging.handlers import TimedRotatingFileHandler
import os

from flask import Flask, url_for
Expand Down Expand Up @@ -64,13 +63,7 @@ def create_app():
app_settings = os.getenv('APP_SETTINGS')
app.config.from_object(app_settings)

# Start logging
if not os.path.exists('logs'):
os.mkdir('logs')
file_handler = TimedRotatingFileHandler('logs/SIP.log', when='midnight', interval=1, backupCount=6)
file_handler.setFormatter(logging.Formatter('%(asctime)s %(levelname)s %(filename)s:%(lineno)d - %(message)s'))
file_handler.setLevel(logging.INFO)
app.logger.addHandler(file_handler)
# Set the logging level
app.logger.setLevel(logging.INFO)
app.logger.info('SIP starting')

Expand Down

0 comments on commit 11c5354

Please sign in to comment.