From fffe085266382cfcaeed4b600f4d6bb104bfa38d Mon Sep 17 00:00:00 2001 From: tobigun Date: Fri, 2 May 2008 16:43:05 +0000 Subject: - replaced some DebugWriteln() with Log.Log...() - added LogFileLevel to be able to control which log-messages are written to the log-file (Error.log) git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1053 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UDataBase.pas | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Game/Code/Classes/UDataBase.pas') diff --git a/Game/Code/Classes/UDataBase.pas b/Game/Code/Classes/UDataBase.pas index 7469e8af..3954f92e 100644 --- a/Game/Code/Classes/UDataBase.pas +++ b/Game/Code/Classes/UDataBase.pas @@ -65,6 +65,7 @@ implementation uses IniFiles, ULog, + StrUtils, SysUtils; const @@ -77,7 +78,7 @@ const Procedure TDataBaseSystem.Init(const Filename: string); begin - debugWriteln( 'TDataBaseSystem.Init ('+Filename+') @ '+ floattostr( now() ) ); + Log.LogStatus('Initializing database: "'+Filename+'"', 'TDataBaseSystem.Init'); //Open Database ScoreDB := TSqliteDatabase.Create( Filename ); @@ -103,8 +104,10 @@ begin finally - debugWriteln( cUS_Songs +' Exist : ' + inttostr( integer(ScoreDB.TableExists( cUS_Songs )) ) ); - debugWriteln( cUS_Scores +' Exist : ' + inttostr( integer(ScoreDB.TableExists( cUS_Scores )) ) ); + Log.LogInfo( cUS_Songs +' exists: ' + IfThen(ScoreDB.TableExists(cUS_Songs), 'true', 'false'), + 'TDataBaseSystem.Init'); + Log.LogInfo( cUS_Scores +' exists: ' + IfThen(ScoreDB.TableExists(cUS_Scores), 'true', 'false'), + 'TDataBaseSystem.Init'); //ScoreDB.Free; end; -- cgit v1.2.3