Porovnvaj se soubory ExeLogu.pas a \BPLOLD\LIB\EXELOGU.PAS
***** ExeLogu.pas
interface
uses Classes, SysUtils{v0.39}, WinUtl, PropUtl{/v0.39}{v0.43},UtlType{/v0.43};

{v0.39}
const
***** \BPLOLD\LIB\EXELOGU.PAS
interface
uses 
  Classes, SysUtils, WinUtl, PropUtl, UtlType;

const
*****

***** ExeLogu.pas
  DefLogDir = 'LOG';
{/v0.39}
{v0.43}
  LogSection = 'LOG';{for INI file}
{/v0.43}
type
***** \BPLOLD\LIB\EXELOGU.PAS
  DefLogDir = 'LOG';
  LogSection = 'LOG';{for INI file}
type
*****

***** ExeLogu.pas
        path }
    {v0.39}
    FDefExt: string;
***** \BPLOLD\LIB\EXELOGU.PAS
        path }
    FDefExt: string;
*****

***** ExeLogu.pas
      { Appended if AFileName has no extension. = .LOG }
    {/v0.39}
    FFileName: string;
***** \BPLOLD\LIB\EXELOGU.PAS
      { Appended if AFileName has no extension. = .LOG }
    FFileName: string;
*****

***** ExeLogu.pas
    FOnLog: TExeLogLog;
    {v0.26}
    FAssigningOnLog: boolean;
    {/v0.26}
    {v0.39}
    FLogToSysLog: boolean;
***** \BPLOLD\LIB\EXELOGU.PAS
    FOnLog: TExeLogLog;
    FAssigningOnLog: boolean;
    FLogToSysLog: boolean;
*****

***** ExeLogu.pas
        (if self is not the main log file) }
    {/v0.39}
  protected
***** \BPLOLD\LIB\EXELOGU.PAS
        (if self is not the main log file) }
    FNoHead: boolean;
    FNoFoot: boolean;
  protected
*****

***** ExeLogu.pas
    procedure SetFileName(const AFileName: string);
    {v0.26}
    procedure SetOnLog(AExeLogLog: TExeLogLog);
    {/v0.26}
    {v0.39}
    procedure SetLogDir(const ADir: string);
    {/v0.39}
  public
***** \BPLOLD\LIB\EXELOGU.PAS
    procedure SetFileName(const AFileName: string);
    procedure SetOnLog(AExeLogLog: TExeLogLog);
    procedure SetLogDir(const ADir: string);
  public
*****

***** ExeLogu.pas
    procedure Log(const Msg: string);
    {v0.39}
    procedure LogErr(const Msg: string);
    {/v0.39}
    procedure LogEvent(ALogEvent: TLogEvent; const Msg: string);
***** \BPLOLD\LIB\EXELOGU.PAS
    procedure Log(const Msg: string);
    procedure LogErr(const Msg: string);
    procedure LogEvent(ALogEvent: TLogEvent; const Msg: string);
*****

***** ExeLogu.pas
    property FileName: string read FFileName write SetFileName;
    {v0.39 moved to published}{/v0.39
    property OverWrite: boolean read FOverWrite write FOverWrite;}
    {v0.42}
    {/v0.42
    property AutoFlushInterval: integer read FAutoFlushInterval write FAutoFlushInterval;}
    property OnLog: TExeLogLog read FOnLog write {v0.26}SetOnLog{/v0.26 FOnLog};
    property LogDir: string read FLogDir write SetLogDir;
  {v0.39}
  published
***** \BPLOLD\LIB\EXELOGU.PAS
    property FileName: string read FFileName write SetFileName;
    property OnLog: TExeLogLog read FOnLog write SetOnLog;
    property LogDir: string read FLogDir write SetLogDir;
  published
*****

***** ExeLogu.pas
    property OverWrite: boolean read FOverWrite write FOverWrite;
  {/v0.39}
  {v0.42}
    property AutoFlushInterval: integer read FAutoFlushInterval write FAutoFlushInterval;
  {/v0.42}
  end;
***** \BPLOLD\LIB\EXELOGU.PAS
    property OverWrite: boolean read FOverWrite write FOverWrite;
    property AutoFlushInterval: integer read FAutoFlushInterval write FAutoFlushInterval;
    property NoHead: boolean read FNoHead write FNoHead;
    property NoFoot: boolean read FNoFoot write FNoFoot;
  end;
*****

***** ExeLogu.pas

{v0.40}
procedure DebLog(const msg: string);
{/v0.40}
implementation
***** \BPLOLD\LIB\EXELOGU.PAS

procedure DebLog(const msg: string);

implementation
*****

***** ExeLogu.pas

{v0.43}
const
***** \BPLOLD\LIB\EXELOGU.PAS

const
*****

***** ExeLogu.pas
  FDebLog: TExeLog = nil;
{/v0.43}

***** \BPLOLD\LIB\EXELOGU.PAS
  FDebLog: TExeLog = nil;

*****

***** ExeLogu.pas
      end;
      Writeln(FText, '');
      Writeln(FText, '*** Log Started ' + FormatDateTime('',Now) + ' ***');
      Writeln(FText, '');
    end else begin
      Writeln(FText, '');
      Writeln(FText, '*** Log Stopped ' + FormatDateTime('',Now) + ' ***');
      Writeln(FText, '');
      CloseFile(FText);
***** \BPLOLD\LIB\EXELOGU.PAS
      end;
      if not FNoHead then begin
        Writeln(FText, '');
        Writeln(FText, '*** Log Started ' + FormatDateTime('',Now) + ' ***');
        Writeln(FText, '');
      end;
    end else begin
      if not FNoFoot then begin
        Writeln(FText, '');
        Writeln(FText, '*** Log Stopped ' + FormatDateTime('',Now) + ' ***');
        Writeln(FText, '');
      end;
      CloseFile(FText);
*****

***** ExeLogu.pas
  if AFileName <> FFileName then begin
    {v0.39}
    if ExtractFileExt(AFileName) = '' then
***** \BPLOLD\LIB\EXELOGU.PAS
  if AFileName <> FFileName then begin
    if ExtractFileExt(AFileName) = '' then
*****

***** ExeLogu.pas
      FFileName := FLogDir + FFileName;
    {/v0.39}
    wasa := Active;
***** \BPLOLD\LIB\EXELOGU.PAS
      FFileName := FLogDir + FFileName;
    wasa := Active;
*****

***** ExeLogu.pas

{v0.39}
procedure TExeLog.SetLogDir(const ADir: string);
***** \BPLOLD\LIB\EXELOGU.PAS

procedure TExeLog.SetLogDir(const ADir: string);
*****

***** ExeLogu.pas
  d := AddBackSlash(d);
  if {winutl}CheckDirExists(d) then
   FLogDir := d;
***** \BPLOLD\LIB\EXELOGU.PAS
  d := AddBackSlash(d);
  if CheckDirExists(d) then
   FLogDir := d;
*****

***** ExeLogu.pas
end;
{/v0.39}

{v0.39}
function GetSecName(const AFileName: string): string;
***** \BPLOLD\LIB\EXELOGU.PAS
end;

function GetSecName(const AFileName: string): string;
*****

***** ExeLogu.pas
end;
{/v0.39}

***** \BPLOLD\LIB\EXELOGU.PAS
end;

*****

***** ExeLogu.pas
  inherited Create(AOwner);
  {v0.39}
  FDefExt := LogExt;
***** \BPLOLD\LIB\EXELOGU.PAS
  inherited Create(AOwner);
  FDefExt := LogExt;
*****

***** ExeLogu.pas
  ClassReadWriteIniFile(Self, 2, '', true);
  {/v0.39}
  if AFileName = '' then begin
***** \BPLOLD\LIB\EXELOGU.PAS
  ClassReadWriteIniFile(Self, 2, '', true);
  if AFileName = '' then begin
*****

***** ExeLogu.pas
    SetFileName(ChangeFileExt(paramstr(0), FDefExt));
  end {v0.39} else begin
    SetFileName(AFileName);
  end{/v0.39};
end;
***** \BPLOLD\LIB\EXELOGU.PAS
    SetFileName(ChangeFileExt(paramstr(0), FDefExt));
  end else begin
    SetFileName(AFileName);
  end;
end;
*****

***** ExeLogu.pas
procedure TExeLog.LogEvent(ALogEvent: TLogEvent; const Msg: string);
{v0.39}
var s: string;
{/v0.39}
begin
***** \BPLOLD\LIB\EXELOGU.PAS
procedure TExeLog.LogEvent(ALogEvent: TLogEvent; const Msg: string);
var
  s: string;
begin
*****

***** ExeLogu.pas
  FLogEvent := ALogEvent;
  {v0.39}
  s := Msg;
***** \BPLOLD\LIB\EXELOGU.PAS
  FLogEvent := ALogEvent;
  s := Msg;
*****

***** ExeLogu.pas
    s := 'ERR: ' + Msg;
  {/v0.39}
  Writeln(FText, {v0.39}s {/v0.39 Msg});
***** \BPLOLD\LIB\EXELOGU.PAS
    s := 'ERR: ' + Msg;
  Writeln(FText, {v0.39}s {/v0.39 Msg});
*****

***** ExeLogu.pas
    FOnLog({v0.39} s {/v0.39 Msg});
  {v0.39}
  if FLogToSysLog and (Self <> ExeLog) and (ExeLog <> nil) {v0.43} and (Self <> FDebLog){/v0.43} then
***** \BPLOLD\LIB\EXELOGU.PAS
    FOnLog({v0.39} s {/v0.39 Msg});
  if FLogToSysLog and (Self <> ExeLog) and (ExeLog <> nil) {v0.43} and (Self <> FDebLog){/v0.43} then
*****

***** ExeLogu.pas
    ExeLog.LogEvent(ALogEvent, {v0.39} s{/v0.39 Msg});
  {/v0.39}
  {v0.43}
  if UseDebugLog and (Self <> FDebLog) then
***** \BPLOLD\LIB\EXELOGU.PAS
    ExeLog.LogEvent(ALogEvent, {v0.39} s{/v0.39 Msg});
  if UseDebugLog and (Self <> FDebLog) then
*****

***** ExeLogu.pas
    DebLog(s);
  {/v0.43}
  if FAutoFlushInterval <> 0 then begin
    if {v0.42}
       (FAutoFlushInterval = 1) or
       {/v0.42}
      ((Now - FLastFlushTime) * 24 * 3600 > FAutoFlushInterval) then
***** \BPLOLD\LIB\EXELOGU.PAS
    DebLog(s);
  if FAutoFlushInterval <> 0 then begin
    if
       (FAutoFlushInterval = 1) or

      ((Now - FLastFlushTime) * 24 * 3600 > FAutoFlushInterval) then
*****

***** ExeLogu.pas


{v0.40}
{v0.43}{/v0.43 const
  FDebLog: TExeLog = nil;}

procedure DebLog(const msg: string);
***** \BPLOLD\LIB\EXELOGU.PAS

procedure DebLog(const msg: string);
*****

***** ExeLogu.pas
end;
{/v0.40}

***** \BPLOLD\LIB\EXELOGU.PAS
end;

*****

***** ExeLogu.pas
  ExeLog.Active := true;
  {v0.43}
  ConfigReadWriteValue(nil, rwRead, LogSection, 'UseDebugLog' , @UseDebugLog, ptByte);
  {/v0.43}
finalization
***** \BPLOLD\LIB\EXELOGU.PAS
  ExeLog.Active := true;
  ConfigReadWriteValue(nil, rwRead, LogSection, 'UseDebugLog' , @UseDebugLog, ptByte);
finalization
*****

***** ExeLogu.pas
  ExeLog.Free;
  {v0.40}
  FDebLog.Free;
  {/v0.40}
  {v0.43}
  ConfigReadWriteValue(nil, rwWrite, LogSection, 'UseDebugLog' , @UseDebugLog, ptByte);
  {/v0.43}
end.
***** \BPLOLD\LIB\EXELOGU.PAS
  ExeLog.Free;
  FDebLog.Free;
  ConfigReadWriteValue(nil, rwWrite, LogSection, 'UseDebugLog' , @UseDebugLog, ptByte);
end.
*****

