Don't log result in DEBUG, or truncate if too large
pawamoy opened this issue · 2 comments
pawamoy commented
Description
Logging the result of the run
method can be problematic when the result is big.
If you query a whole table, the log line can quickly be really, really heavy!! Like in the 100MB range 😮
Line 99 in b1a7ea3
We are currently facing downtime on a webservice using this library indirectly and setting the log level to DEBUG.
I suggest to stop logging the result in DEBUG level (or any other level), or at least truncate it when it's too big.
"Too big" needs to be defined though. Or maybe always truncate to... 100 or 1K characters?
Details
- OS: RedHat
- Python version: 3.6.12
- aiosqlite version: 0.16.0
- Can you repro on 'main' branch? line is still in HEAD, so most probably
- Can you repro in a clean virtualenv? not relevant?
pawamoy commented
Alternative solutions:
- configuring logging to ignore logs coming from aiosqlite
- setting log level to INFO, though until the application/service is stable, DEBUG is needed 😕