diff options
Diffstat (limited to '')
-rw-r--r-- | Game/Code/Classes/ULog.pas | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/Game/Code/Classes/ULog.pas b/Game/Code/Classes/ULog.pas index 50e9bf68..01eff5f4 100644 --- a/Game/Code/Classes/ULog.pas +++ b/Game/Code/Classes/ULog.pas @@ -189,8 +189,6 @@ begin FileErrorO := false; end; end; - {$DEFINE DEBUG} //How can i check if this is set in *.dpr file o0 - //If Debug => Write to Console Output {$IFDEF DEBUG} WriteLn('Error: ' + Text); {$ENDIF} @@ -230,7 +228,7 @@ begin //If Debug => Write to Console Output {$IFDEF DEBUG} - WriteLn(Log2 + ': ' + Log1); +// WriteLn(Log2 + ': ' + Log1); {$ENDIF} end; @@ -260,21 +258,21 @@ end; procedure TLog.LogBuffer(const buf: Pointer; const bufLength: Integer; filename: string); var f : TFileStream; -begin
- f := nil;
-
- try
- f := TFileStream.Create( filename, fmCreate);
- f.Write( buf^, bufLength);
- f.Free;
- except
- on e : Exception do begin
- Log.LogError('TLog.LogBuffer: Failed to log buffer into file "' + filename + '". ErrMsg: ' + e.Message);
- f.Free;
- end;
- end;
-end;
-
+begin + f := nil; + + try + f := TFileStream.Create( filename, fmCreate); + f.Write( buf^, bufLength); + f.Free; + except + on e : Exception do begin + Log.LogError('TLog.LogBuffer: Failed to log buffer into file "' + filename + '". ErrMsg: ' + e.Message); + f.Free; + end; + end; +end; + end. |