Hi,
I have strange behavior when I logging some text to the text file. The sample project in attachement:
LoggerFile.zip (3.6 MB)
The output text file handler settings logger like below:
[General]
Active=1
StripHTML=0
ExceptionHandling=0
TimeStampOutputMode=0
Filters=0;1;2;3
LogLevelFilters=0;1;2;3;4;5;6
Outputs=0;4;5;6
TimeStampFormat='{%"yyyy-mm-dd hh:nn:ss.zzz"dt}, '
LogLevelFormat=[{%s}]
NameFormat=[Name: {%s}]
ValueFormat=[Value: {%s}]
TypeFormat=[Type: {%s}]
[Managed.0.TTMSLoggerTextOutputHandler]
Active=1
FileName=C:\Prodvisor\TMSSupport\LoggerFile\test.log
StripHTML=0
The StripHTML was set to 0
Simple procedure responsible for logging below:
procedure TForm1.FormCreate(Sender: TObject);
var atext:string;
begin
atext:='A<=5'+sLineBreak+'in the middle'+slineBreak+'success-> End';
logserv:=TTMSVCLLogger.Create;
logserv.LoadConfigurationFromFile(Self,'C:\Prodvisor\TMSSupport\LoggerFile\mainlogger.ini');
logserv.Active:=True;
logserv.Debug(atext);
logserv.Free;
end;
The output in the log file is:
2023-04-24 13:04:05.700, [Debug][Value: A End]
Why everything between A and END is truncated?
Should be:
2023-04-24 13:04:05.700, [Debug][Value: A<=5
in the middle
success->End]
To reproduce change the output log file in the mainlogger.ini file.
FileName=C:\Prodvisor\TMSSupport\LoggerFile\test.log