Skip to content

Commit 7ccff6e

Browse files
authored
Merge pull request #51 from geoadmin/feat-reduce-log-verbosity
Reduced the log verbosity - #patch
2 parents 931992e + fcf981d commit 7ccff6e

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

app/helpers/dynamo_db.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def get_entry_by_url(self, url):
5151
try:
5252
return response['Items'][0]
5353
except IndexError:
54-
logger.info(
54+
logger.debug(
5555
"The following url '%s' was not found in dynamodb",
5656
url,
5757
extra={"db_response": response}

app/routes.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import logging
2-
import time
32

43
from flask import abort
54
from flask import jsonify
@@ -18,7 +17,6 @@
1817

1918
@app.route('/checker', methods=['GET'])
2019
def checker():
21-
logger.debug("Checker route entered at %f", time.time())
2220
response = make_response(
2321
jsonify({
2422
'success': True, 'message': 'OK', 'version': APP_VERSION
@@ -47,8 +45,6 @@ def create_shortlink():
4745
}),
4846
201 if new_entry else 200
4947
)
50-
51-
logger.info("Shortlink Creation Successful.", extra={"response": {"json": response.get_json()}})
5248
return response
5349

5450

@@ -65,7 +61,7 @@ def get_shortlink(shortlink_id):
6561
abort(404, f'No short url found for {shortlink_id}')
6662

6763
if should_redirect:
68-
logger.info("redirecting to the following url : %s", db_entry['url'])
64+
logger.debug("redirecting to the following url : %s", db_entry['url'])
6965
return redirect(db_entry['url'], code=301)
7066

7167
return make_response(

0 commit comments

Comments
 (0)