Is it possible to write some more information to the Windows Logs, using TMSLogging?
At the moment all I can write to it is a line of text. I would like to be able to write the Event ID to the logs, especially when an Error occurs.
Is it possible to write less of the 'standard' information to the Windows logs as to a standard log? I don't need al the initialisationtexts etc. to appear in the Windows log.
Pieter Scheldeman2016-11-21 16:49:45
Thank you for your answer on question 1. I will try that.
Concerning question 2: I think I did not describe the problem well. Wat I want to achieve is that some logging (especially the Info statements) DO go to - say - a text logfile, but DO NOT go to the Windows Logging. I want to use the windows logging only for important things, like Warnings and Errors.
var logger1, logger2: TTMSFMXLogger; begin logger1 := TTMSFMXLogger.Create; logger2 := TTMSFMXLogger.Create; logger1.RegisterOutputHandlerClass(TTMSLoggerEventLogOutputHandler, [...]); logger2.RegisterOutputHandler(TTMSLoggerTextOutputHandler, [...]); logger1.Warning(...); logger2.Info(...); end;
Pieter Scheldeman2016-11-22 09:45:51
I see. Great idea. I'll try that as well. Thank you for your quick response!