anchor.diff:      LogThread.PostToThreadMessage(WM_ERASE, 0, 0);
   end;
   
  +procedure TruncateLog(const AMaxSize: longint);
  +begin
  + 		LogThread.PostToThreadMessage(WM_TRUNC, 0, AMaxSize);
  +end;
  +
   function InitLogs: boolean;
   begin
       WLogFileName := ChangeFileExt(ParamStr(0), '.log');
  
positive.code: function PostToLog(const ADateTime: TDateTime; const Text: string; const Level: TLogLevel): boolean; overload;
  function PostToLog(const ADateTime: TDateTime; const Text: string; const AClear: boolean; const Level: TLogLevel): boolean; overload;
  procedure EraseLog;
  
  implementation
  
  uses SysUtils, WThread;
  
  const
      WM_LOG      = WM_WTHREAD_BASE + 1;
      WM_ERASE    = WM_WTHREAD_BASE + 2;
  
  type
      PLogRecord = ^TLogRecord;
  
negative.code: 
  initialization
      FileOpened := false;
      WLogLevel := WLL_NORMAL;
      WLogEnabled := InitLogs;
      FirstLine := true;
      WLogClearOnStart := true;
  
  finalization
      DoneLogs;
  