From 8a3dae1e8bc3c008abc425c026f1c1bdf1ce026d Mon Sep 17 00:00:00 2001 From: Klaus Schmidinger Date: Sat, 25 Mar 2006 12:51:29 +0100 Subject: Enhanced logging EPG event data --- epg.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'epg.c') diff --git a/epg.c b/epg.c index 15a2b0b0..9141f437 100644 --- a/epg.c +++ b/epg.c @@ -7,7 +7,7 @@ * Original version (as used in VDR before 1.3.0) written by * Robert Schneider and Rolf Hakenes . * - * $Id: epg.c 1.66 2006/03/25 11:43:00 kls Exp $ + * $Id: epg.c 1.67 2006/03/25 12:48:34 kls Exp $ */ #include "epg.h" @@ -157,7 +157,7 @@ void cEvent::SetVersion(uchar Version) void cEvent::SetRunningStatus(int RunningStatus, cChannel *Channel) { if (Channel && runningStatus != RunningStatus && (RunningStatus > SI::RunningStatusNotRunning || runningStatus > SI::RunningStatusUndefined) && Channel->HasTimer()) - isyslog("channel %d (%s) event %s '%s' status %d", Channel->Number(), Channel->Name(), *GetTimeString(), Title(), RunningStatus); + isyslog("channel %d (%s) event %s status %d", Channel->Number(), Channel->Name(), *ToDescr(), RunningStatus); runningStatus = RunningStatus; } @@ -208,6 +208,14 @@ void cEvent::SetSeen(void) seen = time(NULL); } +cString cEvent::ToDescr(void) const +{ + char vpsbuf[64] = ""; + if (Vps()) + sprintf(vpsbuf, "(VPS: %s) ", *GetVpsString()); + return cString::sprintf("%s %s-%s %s'%s'", *GetDateString(), *GetTimeString(), *GetEndTimeString(), vpsbuf, Title()); +} + bool cEvent::HasTimer(void) const { for (cTimer *t = Timers.First(); t; t = Timers.Next(t)) { -- cgit v1.2.3