You are not logged in.
Pages: 1
We are not using the framework, only the TSynLog - class itselfs. Maybe later we will switch to the framework.
Our use case (by customer security and application requirements) is that different log entries identified by levels have to be written into separate log-files.
The only approach so far i got working as expected is the following:
type
TXLog = class(TSynLog);
TYLog = class(TSynLog);
var
XLog: TSynLogClass = TXLog;
YLog: TSynLogClass = TYLog;
...
TXLog.Family.Level := LOG_VERBOSE;
TXLog.Family.CustomFileName := 'XLog';
TYLog.Family.Level := [sllUserAuth];
TYLog.Family.CustomFileName := 'YLog';
TXLog.Add.Log(sllInfo, 'Starting x');
TXLog.Add.Log(sllSQL, 'SQL');
TYLog.Add.Log(sllInfo, 'Starting y'); // Will not be written
TYLog.Add.Log(sllUserAuth, 'User Auth');
Hi,
is it possible to use SynLog like log4PHP / log4J? (Database Appender, Mail Appender) Or is TSynLog's use case only for text-file logging?
The only customizing option is EchoCustom, is there an example how to integrate a log4D implementation?
Regards
Alex
Pages: 1