aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/Classes/ULog.pas
diff options
context:
space:
mode:
Diffstat (limited to 'Game/Code/Classes/ULog.pas')
-rw-r--r--Game/Code/Classes/ULog.pas15
1 files changed, 13 insertions, 2 deletions
diff --git a/Game/Code/Classes/ULog.pas b/Game/Code/Classes/ULog.pas
index c30bf676..4e976ab4 100644
--- a/Game/Code/Classes/ULog.pas
+++ b/Game/Code/Classes/ULog.pas
@@ -53,6 +53,7 @@ type
end;
procedure SafeWriteLn(const msg: string); {$IFDEF HasInline}inline;{$ENDIF}
+procedure debugWriteln( aString : String );
var
Log: TLog;
@@ -66,8 +67,8 @@ uses
SysUtils,
DateUtils,
//UFiles,
- UMain,
URecord,
+ UMain,
UTime,
//UIni, // JB - Seems to not be needed.
{$IFDEF FPC}
@@ -136,10 +137,20 @@ begin
SDL_CondSignal(ConsoleCond);
SDL_mutexV(ConsoleMutex);
{$ELSE}
- WriteLn(msg);
+ debugWriteln(msg);
{$ENDIF}
end;
+procedure debugWriteln( aString : String );
+begin
+ {$IFDEF CONSOLE}
+ if FindCmdLineSwitch( cDebug ) then
+ writeln( 'DEBUG - '+aString );
+ {$ENDIF}
+
+end;
+
+
constructor TLog.Create;
begin
{$IFDEF FPC}