diff --git a/app.py b/app.py index 640f73a..e635783 100644 --- a/app.py +++ b/app.py @@ -35,12 +35,14 @@ if config: if 'log_level' in config: logger.setLevel(config['log_level']) + else: + logging.setLevel('INFO') if 'client_secret' in config: SECRET_KEY = config['client_secret'] else: - logging.setLevel(config['INFO']) + logging.setLevel('INFO') @@ -250,7 +252,6 @@ def logout(): return redirect(url_for('index')) - def save_list_of_cameras(een=None): user = User.query.filter(User.email == een.current_user['email']).first() if user: @@ -402,7 +403,7 @@ def camera_list_of_videos(esn=None): een = session['een'] camera = een.get_camera_by_id(esn) - logging.debug(camera.get_list_of_videos(start_timestamp=een.time_before(hours=24), end_timestamp=een.time_now())) + logging.debug(camera.get_list_of_videos(start_timestamp=een.time_before(hours=24 * DAYS_OF_HISTORY), end_timestamp=een.time_now())) db_camera = Camera.query.filter(Camera.device_id == esn).first() if db_camera: