TMSLogger problem

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

Hello @wlandgraf could you look into this issue?

Hi Tomasz,

Thank you for reporting. Indeed, StripHtml was not being saved or loaded from configuration files. Next release will have this fixed.

In the meanwhile, as a workaround you can simply set such property manually from code.

Thank you for the answer, yes I already did it :grinning:

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.