Changeset 34 for trunk/Components/Common/UDebugLog.pas
- Timestamp:
- Nov 25, 2017, 12:27:33 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 3 3 backup 4 4 tunneler.exe 5 tunneler.dbg 6 tunneler.lps 5 7 heaptrclog.trc 6 tunneler.lps 8 Components/Common/Languages/*.mo 9 Components/CoolTranslator/Demo/lib
-
- Property svn:ignore
-
trunk/Components/Common/UDebugLog.pas
r31 r34 31 31 Items: TListObject; 32 32 Lock: TCriticalSection; 33 procedure Add( Group: string; Text: string);33 procedure Add(Text: string; Group: string = ''); 34 34 procedure WriteToFile(Text: string); 35 35 constructor Create(AOwner: TComponent); override; … … 52 52 procedure Register; 53 53 begin 54 RegisterComponents(' Samples', [TDebugLog]);54 RegisterComponents('Common', [TDebugLog]); 55 55 end; 56 56 … … 69 69 end; 70 70 71 procedure TDebugLog.Add( Group: string; Text: string);71 procedure TDebugLog.Add(Text: string; Group: string = ''); 72 72 var 73 73 NewItem: TDebugLogItem; … … 103 103 try 104 104 if ExtractFileDir(FileName) <> '' then 105 ForceDirectories UTF8(ExtractFileDir(FileName));106 if FileExists UTF8(FileName) then LogFile := TFileStream.Create(UTF8Decode(FileName), fmOpenWrite)105 ForceDirectories(ExtractFileDir(FileName)); 106 if FileExists(FileName) then LogFile := TFileStream.Create(UTF8Decode(FileName), fmOpenWrite) 107 107 else LogFile := TFileStream.Create(UTF8Decode(FileName), fmCreate); 108 108 LogFile.Seek(0, soFromEnd);
Note:
See TracChangeset
for help on using the changeset viewer.