[SERVER-11873] Truncating Log Lines breaks UTF-8 characters Created: 27/Nov/13  Updated: 10/Dec/14  Resolved: 30/Nov/13

Status: Closed
Project: Core Server
Component/s: Logging
Affects Version/s: 2.4.8
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Andre de Frere Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Operating System: ALL
Steps To Reproduce:
  1. Set log level to 1 (so that the update is captured in the logs)

    db.adminCommand( { setParameter : 1, logLevel : 1 } )

  2. Run the update:

    db.test.update( {}, { $set : { description : "Anupam Roy is a Bengali lyricist, composer, singer from Kolkata, West Bengal, India. He is best known for his song Amake amar moto thakte dao (আমাকে আমার মত থাকতে দাও), which appeared on the soundtrack to the 2010 film Autograph"}})

  3. Check the log for broken UTF-8 character strings
Participants:

 Description   

In the cases where long log lines are truncated, this can break UTF-8 characters.

For example, the following update (with text from Wikipedia):

db.test.update( {}, { $set : { description : "Anupam Roy is a Bengali lyricist, composer, singer from Kolkata, West Bengal, India. He is best known for his song Amake amar moto thakte dao (আমাকে আমার মত থাকতে দাও), which appeared on the soundtrack to the 2010 film Autograph"}})

Will appear as:

Wed Nov 27 11:03:02.373 [conn2] update test.test update: { $set: { LikeDescription: "Anupam Roy is a Bengali lyricist, composer, singer from Kolkata, West Bengal, India. He is best known for his song Amake amar moto thakte dao (আম�..." } } nscanned:0 nupdated:0 keyUpdates:0 locks(micros) w:52 0ms

in the log (where the final characters before the ellipsis are "আম�...")

This breaks the final UTF-8 character, as it has been truncated part way through the sequence.



 Comments   
Comment by Eliot Horowitz (Inactive) [ 30/Nov/13 ]

See SERVER-7506

Generated at Thu Feb 08 03:26:58 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.