[DOCS-8981] Add flag to customize maxLogLine when logging large lines Created: 28/Sep/16  Updated: 30/Oct/23  Resolved: 18/Jan/18

Status: Closed
Project: Documentation
Component/s: Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Task Priority: Major - P3
Reporter: Emily Hall Assignee: Brian Moss
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Documented
documents SERVER-17358 Add flag to customize maxLogLine when... Closed
Duplicate
is duplicated by DOCS-10493 Document setParameter maxLogSizeKB Closed
Participants:
Days since reply: 6 years, 8 weeks, 5 days ago

 Description   

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



 Comments   
Comment by Githook User [ 15/Dec/17 ]

Author:

{'name': 'Brian Moss', 'email': 'kallimachos@gmail.com', 'username': 'kallimachos'}

Message: DOCS-8981: Document maxLogSizeKB parameter

Also fix two minor typos.
Branch: v3.4
https://github.com/mongodb/docs/commit/c54a335d9198ac3f5f911c2274537768be5742fd

Comment by Githook User [ 15/Dec/17 ]

Author:

{'name': 'Brian Moss', 'email': 'kallimachos@gmail.com', 'username': 'kallimachos'}

Message: DOCS-8981 Add warning for large maxLogSizeKB values
Branch: master
https://github.com/mongodb/docs/commit/d0dbf79c15b5ff9a2844247a105361db8d36249e

Comment by Githook User [ 15/Dec/17 ]

Author:

{'name': 'Brian Moss', 'email': 'kallimachos@gmail.com', 'username': 'kallimachos'}

Message: DOCS-8981: Document maxLogSizeKB parameter

Also fix two minor typos.
Branch: master
https://github.com/mongodb/docs/commit/88b65638f247f2fe7332fac83577a01c362958e4

Comment by Brian Moss [ 12/Dec/17 ]

Tech review is LGTM.

Ready for docs review.

Comment by Brian Moss [ 08/Dec/17 ]

kevin.pulo Could you please provide a tech review of https://github.com/mongodb/docs/pull/3157 ? Thanks!

Comment by Kevin Pulo [ 06/Jul/17 ]

The parameter that was added is called maxLogSizeKB.

Generated at Thu Feb 08 07:57:21 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.