mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 15:55:54 +01:00
New sample for TLoggerProFileByFolderAppender
This commit is contained in:
parent
59be2840ab
commit
b3ca81b523
@ -0,0 +1,31 @@
|
||||
unit LoggerProConfig;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
LoggerPro;
|
||||
|
||||
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([
|
||||
TLoggerProFileByFolderAppender.Create(10, 2048, 'logs')
|
||||
]);
|
||||
|
||||
end.
|
@ -0,0 +1,15 @@
|
||||
program file_appender_by_folder;
|
||||
|
||||
uses
|
||||
Vcl.Forms,
|
||||
LoggerProConfig in 'LoggerProConfig.pas',
|
||||
MainFormU in '..\common\MainFormU.pas' {MainForm};
|
||||
|
||||
{$R *.res}
|
||||
|
||||
begin
|
||||
Application.Initialize;
|
||||
Application.MainFormOnTaskbar := True;
|
||||
Application.CreateForm(TMainForm, MainForm);
|
||||
Application.Run;
|
||||
end.
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user