[longomatch/redesign3: 152/156] Add more logging to the db



commit 9e24259c736860bf8c72cd2414d701681441339d
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Thu Aug 18 00:11:16 2011 +0200

    Add more logging to the db

 LongoMatch/Services/DataBase.cs |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/LongoMatch/Services/DataBase.cs b/LongoMatch/Services/DataBase.cs
index 6c5ab0b..29aeb6b 100644
--- a/LongoMatch/Services/DataBase.cs
+++ b/LongoMatch/Services/DataBase.cs
@@ -89,6 +89,8 @@ namespace LongoMatch.DB
 			if(!System.IO.File.Exists(file))
 				CreateNewDB();
 			
+			Log.Information ("Using database file: " + file);
+			
 			GetDBVersion();
 			GetBackupDate();
 			CheckDB();
@@ -298,6 +300,7 @@ namespace LongoMatch.DB
 				lastBackup = new BackupDate { Date = DateTime.UtcNow};
 				db.Store(dbVersion);
 				db.Store(lastBackup);
+				Log.Information("Created new database:" + file);
 			}
 			finally {
 				db.Close();
@@ -315,7 +318,7 @@ namespace LongoMatch.DB
 			BackupDate lastBackup = GetObject<BackupDate> ();
 			if (lastBackup == null)
 				lastBackup = new BackupDate {Date = DateTime.UtcNow};
-			Log.Information("Last DB backup: "+ lastBackup.Date.ToShortDateString());
+			Log.Information("DB last backup: "+ lastBackup.Date.ToShortDateString());
 		}
 		
 		private void UpdateBackupDate () {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]