delphimvcframework/samples/customlogger/CustomLoggerConfigU.pas

26 lines
599 B
ObjectPascal
Raw Normal View History

2016-11-27 23:17:20 +01:00
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.