enhance exception logging
This commit is contained in:
parent
a8198f889a
commit
550a7888bf
@ -2,7 +2,6 @@
|
|||||||
# pylint: disable=invalid-name
|
# pylint: disable=invalid-name
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import reprlib
|
|
||||||
import socket
|
import socket
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
@ -112,8 +111,8 @@ class LogExceptionFormatter(logging.Formatter):
|
|||||||
if request.method == "GET":
|
if request.method == "GET":
|
||||||
record.http_params = str(request.args)
|
record.http_params = str(request.args)
|
||||||
else:
|
else:
|
||||||
rep = reprlib.Repr() # abbrège
|
# rep = reprlib.Repr() # abbrège
|
||||||
record.http_params = str(rep.repr(request.form))
|
record.http_params = str(request.form)[:2048]
|
||||||
else:
|
else:
|
||||||
record.url = None
|
record.url = None
|
||||||
record.remote_addr = None
|
record.remote_addr = None
|
||||||
|
Loading…
Reference in New Issue
Block a user