2016-11-27 23:17:20 +01:00
|
|
|
unit CustomLoggerConfigU;
|
|
|
|
|
|
|
|
interface
|
|
|
|
|
|
|
|
uses
|
|
|
|
LoggerPro; // loggerpro core
|
|
|
|
|
|
|
|
function GetLogger: ILogWriter;
|
|
|
|
|
|
|
|
implementation
|
|
|
|
|
|
|
|
uses
|
2017-06-01 14:46:10 +02:00
|
|
|
System.IOUtils
|
|
|
|
, LoggerPro.FileAppender // loggerpro file appender (logs to file)
|
|
|
|
|
|
|
|
{$IFDEF MSWINDOWS} , LoggerPro.OutputdebugStringAppender {$ENDIF} // loggerpro outputdebugstring appender (logs to the debugger)
|
|
|
|
;
|
2016-11-27 23:17:20 +01:00
|
|
|
|
|
|
|
function GetLogger: ILogWriter;
|
|
|
|
begin
|
|
|
|
Result := BuildLogWriter([
|
2017-06-01 14:46:10 +02:00
|
|
|
TLoggerProFileAppender.Create(10, 1000, TPath.Combine('MyFolder', 'MyLogs'))
|
|
|
|
|
|
|
|
{$IFDEF MSWINDOWS}, TLoggerProOutputDebugStringAppender.Create{$ENDIF}
|
|
|
|
|
2016-11-27 23:17:20 +01:00
|
|
|
], nil, TLogType.Debug);
|
|
|
|
end;
|
|
|
|
|
|
|
|
end.
|