Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Quick.Log.pas
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ function TQuickLog.SetLog(logname : string; AddCurrentDateToFileName : Boolean;
fHideHour := True;
fCurrentDateToFileName := AddCurrentDateToFileName;
fLogFileName := logname;
logname := GetLogFileName;
//Checks if logfile is too big and deletes
fLimitLogSize := LimitSizeInMB * 1024 * 1024;
if (fLimitLogSize > 0) and (TFile.Exists(logname)) then
Expand Down
33 changes: 33 additions & 0 deletions samples/delphi/QuickLog/QuickLogDemo.dpr
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
program QuickLogDemo;

{$APPTYPE CONSOLE}

{$IFDEF FPC}
{$MODE DELPHI}
{$ENDIF}

{$R *.res}

uses
Quick.Log, Quick.Commons;

begin
Log := TQuickLog.Create;
try
Log.SetLog('.\QuickDemo.log', True, 50);
Log.Add('QuickLogDemo Start', etTrace);

Log.Add('Info', etInfo);
Log.Add('Success', etSuccess);
Log.Add('Warning', etWarning);
Log.Add('Error', etError);
Log.Add('Debug', etDebug);
Log.Add('Done', etDone);
Log.Add('Critical', etCritical);
Log.Add('Exception', etException);

Log.Add('QuickLogDemo End', etTrace);
finally
Log.Free;
end;
end.
Loading