mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-16 08:15:53 +01:00
26 lines
599 B
ObjectPascal
26 lines
599 B
ObjectPascal
|
unit CustomLoggerConfigU;
|
||
|
|
||
|
interface
|
||
|
|
||
|
uses
|
||
|
LoggerPro; // loggerpro core
|
||
|
|
||
|
function GetLogger: ILogWriter;
|
||
|
|
||
|
implementation
|
||
|
|
||
|
uses
|
||
|
LoggerPro.FileAppender, // loggerpro file appender (logs to file)
|
||
|
LoggerPro.ConsoleAppender, // loggerpro console appender (logs to the console)
|
||
|
LoggerPro.OutputdebugStringAppender; // loggerpro outputdebugstring appender (logs to the debugger)
|
||
|
|
||
|
function GetLogger: ILogWriter;
|
||
|
begin
|
||
|
Result := BuildLogWriter([
|
||
|
TLoggerProFileAppender.Create(10, 1000, 'MyFolder\MyLogs'),
|
||
|
TLoggerProOutputDebugStringAppender.Create
|
||
|
], nil, TLogType.Debug);
|
||
|
end;
|
||
|
|
||
|
end.
|