Ignore:
Timestamp:
Jun 29, 2018, 11:44:07 PM (6 years ago)
Author:
chronos
Message:
  • Modified: Updated Common package.
  • Modified: Updated IPTV prices.
  • Added: deb package build script.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/UDebugLog.pas

    r114 r122  
    66
    77uses
    8   Classes, SysUtils, FileUtil, SpecializedList, SyncObjs, LazFileUtils;
     8  Classes, SysUtils, FileUtil, SpecializedList, SyncObjs;
    99
    1010type
     
    3131    Items: TListObject;
    3232    Lock: TCriticalSection;
    33     procedure Add(Group: string; Text: string);
     33    procedure Add(Text: string; Group: string = '');
    3434    procedure WriteToFile(Text: string);
    3535    constructor Create(AOwner: TComponent); override;
     
    5252procedure Register;
    5353begin
    54   RegisterComponents('Samples', [TDebugLog]);
     54  RegisterComponents('Common', [TDebugLog]);
    5555end;
    5656
     
    6969end;
    7070
    71 procedure TDebugLog.Add(Group: string; Text: string);
     71procedure TDebugLog.Add(Text: string; Group: string = '');
    7272var
    7373  NewItem: TDebugLogItem;
     
    103103  try
    104104    if ExtractFileDir(FileName) <> '' then
    105       ForceDirectoriesUTF8(ExtractFileDir(FileName));
    106     if FileExistsUTF8(FileName) then LogFile := TFileStream.Create(UTF8Decode(FileName), fmOpenWrite)
    107       else LogFile := TFileStream.Create(UTF8Decode(FileName), fmCreate);
     105      ForceDirectories(ExtractFileDir(FileName));
     106    if FileExists(FileName) then LogFile := TFileStream.Create(FileName, fmOpenWrite)
     107      else LogFile := TFileStream.Create(FileName, fmCreate);
    108108    LogFile.Seek(0, soFromEnd);
    109109    Text := FormatDateTime('hh:nn:ss.zzz', Now) + ': ' + Text + LineEnding;
Note: See TracChangeset for help on using the changeset viewer.