danieleteti / loggerpro

An modern and pluggable logging framework for Delphi
Apache License 2.0
353 stars 91 forks source link

Bug in constructor TLoggerProUDPSyslogPacket.Create(pLogItem: TLogItem; pHostName: string; pUserName: string; pApplication: string; pVersion: string; pProcID: string; pUnixLineBreaks: Boolean; pUTF8BOM: Boolean); #50

Closed Lajos-Juhasz closed 3 years ago

Lajos-Juhasz commented 3 years ago

constructor TLoggerProUDPSyslogPacket.Create(pLogItem: TLogItem; pHostName: string; pUserName: string; pApplication: string; pVersion: string; pProcID: string; pUnixLineBreaks: Boolean; pUTF8BOM: Boolean);

If pUnixLineBreaks is false the logger doesn't sends the LogMessage. Currently:

if FUnixLineBreaks then FMessageData := pLogItem.LogMessage.Replace(sLineBreak, '#10', [rfReplaceAll]);

Should be:

if FUnixLineBreaks then FMessageData := pLogItem.LogMessage.Replace(sLineBreak, '#10', [rfReplaceAll]) else FMessageData := pLogItem.LogMessage;

danieleteti commented 3 years ago

Thank you, fixed

nurettin commented 3 years ago

Sorry that was on me, I didn't want to update the code without testing since I don't use delphi anymore.