The logger truncates log messages larger than 10k by printing the first ~3k bytes and last ~3k bytes and printing a "........" in the center. This limit seems arbitrary and would be useful if we could override it. We have customers submitting very large queries (huge $in: [] clauses for example) and although not ideal, the query contents are useful to us. The ellipses often break our query parser when doing log analysis.
It looks like a simple enough change - we would just need to switch maxLogLine from a const to some flag-driven value.
https://github.com/mongodb/mongo/blob/master/src/mongo/logger/message_event_utf8_encoder.cpp#L71
Mon Feb 23 21:39:07.519 [conn5324624] warning: log line attempted (19k) over max size (10k), printing beginning and end ... query
- is duplicated by
-
SERVER-14339 Option to not truncate long log messages
- Closed
- is related to
-
SERVER-30387 maxLogSizeKB parameter should only be positive
- Closed
-
SERVER-30386 Rename maxLogSizeKB parameter to maxLogLineKB
- Closed