File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed
Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ def __init__(
5959 logger .setLevel (logging .INFO )
6060 handler = logging .StreamHandler (sys .stdout )
6161 handler .setLevel (logging .INFO )
62- handler .setFormatter (JsonLogFormatter )
62+ handler .setFormatter (JsonLogFormatter () )
6363 logger .addHandler (handler )
6464 self .logger = logger
6565
Original file line number Diff line number Diff line change @@ -47,7 +47,21 @@ def test_lbheartbeat_head(client):
4747 assert response .content == b""
4848
4949
50- def test_mozlog (app , client , caplog ):
50+ def test_mozlog_record_formatted_as_json (app , client , capsys ):
51+ app .state .DOCKERFLOW_SUMMARY_LOG_QUERYSTRING = True
52+
53+ client .get (
54+ "/__lbheartbeat__?x=شكر" ,
55+ headers = {
56+ "User-Agent" : "dockerflow/tests" ,
57+ "Accept-Language" : "en-US" ,
58+ },
59+ )
60+ stdout = capsys .readouterr ().out
61+ assert json .loads (stdout )
62+
63+
64+ def test_mozlog_record_attrs (app , client , caplog ):
5165 app .state .DOCKERFLOW_SUMMARY_LOG_QUERYSTRING = True
5266
5367 client .get (
You can’t perform that action at this time.
0 commit comments