mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-17 00:35:55 +01:00
36 lines
523 B
ObjectPascal
36 lines
523 B
ObjectPascal
|
unit LoggerProConfig;
|
||
|
|
||
|
interface
|
||
|
|
||
|
uses
|
||
|
LoggerPro,
|
||
|
LoggerPro.Proxy;
|
||
|
|
||
|
function Log: ILogWriter;
|
||
|
|
||
|
implementation
|
||
|
|
||
|
uses
|
||
|
LoggerPro.FileAppender;
|
||
|
|
||
|
var
|
||
|
_Log: ILogWriter;
|
||
|
|
||
|
function Log: ILogWriter;
|
||
|
begin
|
||
|
Result := _Log;
|
||
|
end;
|
||
|
|
||
|
initialization
|
||
|
|
||
|
// Create up to 10 logs in the exe\logs folder, max 2MiB each, using DEFAULT_FILENAME_FORMAT = '{module}.{number}.log';
|
||
|
|
||
|
_Log := BuildLogWriter([
|
||
|
TLoggerProSimpleFileAppender.Create(10, 2048, 'logs',
|
||
|
'{module}.{pid}.{number}.log',
|
||
|
TLogLayout.LOG_LAYOUT_0)
|
||
|
]);
|
||
|
|
||
|
|
||
|
end.
|