Hi,
My example logger configuration file below
[General]
Active=1
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
StripHtml=1
ApplyOutputParameters=1
LogLevelFilters=0;1;2;3;4;5;6
FileName=C:\LAB\log\aaa.log
When I load the configuration from this file and log something the output is:
To TMSLogging v 2.6.1.1
2023-11-16 14:20:50.931, [Debug][Value: aaa]
From TMSLogging v 2.7.X.X the output is:
'2023-11-16 14:20:50.931, '[Debug][Value: aaa]
I need one space after a comma that I set TimeStampFormat like this (it wasn't a problem before version 2.7.X.X)
TimeStampFormat='{%"yyyy-mm-dd hh:nn:ss.zzz"dt}, '
In general, log output should be unquoted (without ') as was in the past.
wlandgraf
(Wagner Landgraf)
November 17, 2023, 12:48pm
2
Indeed, we recently internally replaced TINiFile
by TMemIniFile
, and the former used to dequote strings.
We will release an update with the fix, but in the meanwhile, you can modify TMSLoggingCore
unit yourself:
OutputFormats.TimeStampFormat := AnsiDequotedStr(ini.ReadString('General', 'TimeStampFormat', OutputFormats.TimeStampFormat), '''');
OutputFormats.LogLevelFormat := ini.ReadString('General', 'LogLevelFormat', OutputFormats.LogLevelFormat);
OutputFormats.NameFormat := AnsiDequotedStr(ini.ReadString('General', 'NameFormat', OutputFormats.NameFormat), '''');
OutputFormats.ValueFormat := AnsiDequotedStr(ini.ReadString('General', 'ValueFormat', OutputFormats.ValueFormat), '''');
OutputFormats.TypeFormat := AnsiDequotedStr(ini.ReadString('General', 'TypeFormat', OutputFormats.TypeFormat), '''');
ok ... thx ... but after change the source ... how can I rebuild TMS Logging package?
wlandgraf
(Wagner Landgraf)
November 17, 2023, 1:24pm
4
You can use the "Package Rebuild Tool" app, there is a shortcut for it in the Windows Start Menu.
Or, if you are using TMS Smart Setup, just call tms build
. ;-)
Ok ... I will try a new way ... TMS Smart Serup
system
(system)
Closed
January 3, 2024, 12:43pm
6
This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.