[gnome-dvb-daemon] Added more debug output
- From: Sebastian Polsterl <sebp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-dvb-daemon] Added more debug output
- Date: Sun, 29 May 2011 11:10:59 +0000 (UTC)
commit 03f84a1438cecb8e28fada02f8c51991bea341d4
Author: Sebastian Pölsterl <sebp k-d-w org>
Date: Sun May 29 12:10:17 2011 +0200
Added more debug output
src/Schedule.vala | 4 ++--
src/database/sqlite/SqliteEPGStore.vala | 13 +++++++++++--
2 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/src/Schedule.vala b/src/Schedule.vala
index b76fdf6..164c745 100644
--- a/src/Schedule.vala
+++ b/src/Schedule.vala
@@ -80,8 +80,8 @@ namespace DVB {
}
}
- log.debug ("Finished restoring EPG events for channel %u",
- this.channel.Sid);
+ log.debug ("Finished restoring %d EPG events for channel %u",
+ this.events.size, this.channel.Sid);
}
public Schedule (Channel channel) {
diff --git a/src/database/sqlite/SqliteEPGStore.vala b/src/database/sqlite/SqliteEPGStore.vala
index e7d9377..242aa43 100644
--- a/src/database/sqlite/SqliteEPGStore.vala
+++ b/src/database/sqlite/SqliteEPGStore.vala
@@ -20,11 +20,14 @@
using GLib;
using Gee;
using Sqlite;
+using DVB.Logging;
namespace DVB.database.sqlite {
public class SqliteEPGStore : SqliteDatabase, EPGStore {
+ private static Logger log = LogManager.getLogManager().getDefaultLogger();
+
private static const int VERSION = 2;
private static const string CREATE_EVENTS_TABLE_STATEMENT =
@@ -143,7 +146,10 @@ namespace DVB.database.sqlite {
event.day, event.hour, event.minute, event.second);
// Check if start time got converted correctly
- if (julian_start <= 0) return false;
+ if (julian_start <= 0) {
+ log.warning ("Failed to convert start time");
+ return false;
+ }
if (this.contains_event (event, channel_sid, group_id)) {
if (this.update_event_statement.bind_double (1, julian_start) != Sqlite.OK
@@ -285,7 +291,10 @@ namespace DVB.database.sqlite {
{
Gee.List<Event> events = new ArrayList<Event> ();
- if (this.db == null) return events;
+ if (this.db == null) {
+ log.warning ("DB not initialized");
+ return events;
+ }
string statement_str = SELECT_MINIMAL_EVENTS_STATEMENT.printf (
group_id, channel_sid);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]