From fce718ece3b0709fb9456ff40684ff78a2af8225 Mon Sep 17 00:00:00 2001 From: g00r00 Date: Wed, 2 Oct 2013 20:38:06 -0400 Subject: [PATCH] increased buffer size to 8kb, now rolls at proper filesize --- mdl/m_logroller.pas | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mdl/m_logroller.pas b/mdl/m_logroller.pas index 5e79020..c1d5bca 100644 --- a/mdl/m_logroller.pas +++ b/mdl/m_logroller.pas @@ -38,7 +38,7 @@ Begin MaxSize := Max * 1024; MaxLogs := ML; - BufSize := 4 * 1024; + BufSize := 8 * 1024; CurLevel := Level; PreFix := FN; @@ -60,7 +60,7 @@ Var Begin If CurLevel < LogLevel Then Exit; - If (MaxSize > 0) And (System.FileSize(LogFile.InFile) > MaxSize) Then Begin + If (MaxSize > 0) And (System.FileSize(LogFile.InFile) + LogFile.BufPos > MaxSize) Then Begin LogFile.CloseStream; FileErase (PreFix + '_' + strI2S(MaxLogs) + '.log'); @@ -79,4 +79,4 @@ Begin LogFile.WriteBlock (LogStr[1], Length(LogStr)); End; -End. \ No newline at end of file +End.