[syslog-ng] Logs after "\n" are getting truncated

Swati4 M/TVM/TCS swati4.m at tcs.com
Tue Nov 8 14:38:22 CET 2011


Hi All,

When logging multiline messages (simple strings with in-line newlines "\n") our logs only show the first line (ie) before "\n" is encountered and rest of the line after the first newline character("\n") is truncated.


Example:

Code Snippet:

HS_MAP_INFO_LOG("[ %s ] Resource [ %d ] Sensor Number: %2d, Sensor Type: %d, Event Category: %d, Assertion: %d, \n" 
"Event State: %d, Previous State: %d, OEM Code: %d, Sensor Specific: %d\n", eidStr, 
pEvt->Source, 
thisSensorEvent->SensorNum, 
thisSensorEvent->SensorType, 
thisSensorEvent->EventCategory, 
thisSensorEvent->Assertion, 
thisSensorEvent->EventState, 
thisSensorEvent->PreviousState, 
thisSensorEvent->Oem, 
thisSensorEvent->SensorSpecific); 


Expected Output on Log:

May 4 11:32:34 base0-0-0-1-0-11-1 shelfHs[5255]: 5257: sHs[Info]: 1304523154.708143: hsMapLog.cpp(47): hsMapHpiShelfHsBUtils.cpp(240): [ 0:0:9:0:11:1 ] Resource [ 68 ] Sensor Number: 9, Sensor Type: 2, Event Category: 1, Assertion: 1, Event State: 16, PreviousState: 0, OEM Code: 0, Sensor Specific: 0


Actual Output populated on Log:

May 4 10:18:37 base0-0-0-1-0-11-1 shelfHs[4539]: 4542: sHs[Info]: 1304518717.501982: hsMapLog.cpp(47): hsMapHpiShelfHsBUtils.cpp(240): [ 0:0:9:0:11:1 ] Resource [ 98 ] Sensor Number: 9, Sensor Type: 2, Event Category: 1, Assertion: 1,



So,if anyone know some kind of fix/patch for resolving this issue, please let me know. Your help would be highly appreciated.


Thanks & regards
Swati.
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain 
confidential or privileged information. If you are 
not the intended recipient, any dissemination, use, 
review, distribution, printing or copying of the 
information contained in this e-mail message 
and/or attachments to it are strictly prohibited. If 
you have received this communication in error, 
please notify us by reply e-mail or telephone and 
immediately and permanently delete the message 
and any attachments. Thank you




More information about the syslog-ng mailing list