diff options
author | mrwastl <mrwastl@users.sourceforge.net> | 2011-10-26 18:55:17 +0200 |
---|---|---|
committer | mrwastl <mrwastl@users.sourceforge.net> | 2011-10-26 18:55:17 +0200 |
commit | b6965912173a2c219ccd1e10e351fcbe4b7695fe (patch) | |
tree | 41487b91b74c99153db5d6b52f8e23a2722ba4b0 | |
parent | 29fee5f9a212851d4412ae57f3b2a12e78c011fa (diff) | |
download | vdr-plugin-graphlcd-b6965912173a2c219ccd1e10e351fcbe4b7695fe.tar.gz vdr-plugin-graphlcd-b6965912173a2c219ccd1e10e351fcbe4b7695fe.tar.bz2 |
improved syslog messages (more consistent)
-rw-r--r-- | alias.c | 5 | ||||
-rw-r--r-- | display.c | 2 | ||||
-rw-r--r-- | plugin.c | 24 | ||||
-rw-r--r-- | service.c | 12 | ||||
-rw-r--r-- | skinconfig.c | 2 |
5 files changed, 23 insertions, 22 deletions
@@ -7,7 +7,8 @@ * to the COPYING file distributed with this package. * * (c) 2001-2004 Carsten Siebholz <c.siebholz AT t-online.de> - * (c) 2004 Andreas Regel <andreas.regel AT powarman.de> + * (c) 2004 Andreas Regel <andreas.regel AT powarman.de> + * (c) 2011 Wolfgang Astleitner <mrwastl AT users sourceforge net> */ #include <fstream> @@ -38,7 +39,7 @@ bool cChannelAliasList::Load(const std::string & CfgPath) #endif if (!file.is_open()) { - esyslog("graphlcd: Error opening channel alias file %s!", aliasFileName.c_str()); + esyslog("graphlcd plugin: ERROR opening channel alias file '%s'", aliasFileName.c_str()); return false; } @@ -134,7 +134,7 @@ void cGraphLCDDisplay::Action(void) int skipx = mLcd->Width() >> 3; int skipy = mLcd->Height() >> 3; - esyslog("graphlcd plugin: ERROR loading skin\n"); + esyslog("graphlcd plugin: ERROR loading skin '%s'\n", mSkinConfig->SkinName().c_str()); mLcd->Clear(); // clear the screen with a filled rectangle using a defined colour to guarantee visible text or 'X' @@ -185,11 +185,11 @@ bool cPluginGraphLCD::Initialize() if (mConfigName.length() == 0) { mConfigName = PLUGIN_GRAPHLCDCONF; - isyslog("graphlcd plugin: No config file specified, using default (%s).\n", mConfigName.c_str()); + isyslog("graphlcd plugin: INFO: No config file specified, using default (%s).\n", mConfigName.c_str()); } if (GLCD::Config.Load(mConfigName) == false) { - esyslog("graphlcd plugin: Error loading config file!\n"); + esyslog("graphlcd plugin: ERROR loading config file!\n"); return false; } if (GLCD::Config.driverConfigs.size() == 0) @@ -200,13 +200,13 @@ bool cPluginGraphLCD::Initialize() if (mDisplayNames == "none") { - isyslog("graphlcd plugin: WARNING: displayname = none, starting with no display connected.\n"); + isyslog("graphlcd plugin: INFO: displayname = none, starting with no display connected.\n"); return true; } if (mDisplayNames.length() == 0) { - isyslog("graphlcd plugin: WARNING: No display specified, using first one (%s).\n", GLCD::Config.driverConfigs[0].name.c_str()); + isyslog("graphlcd plugin: INFO: No display specified, using first one (%s).\n", GLCD::Config.driverConfigs[0].name.c_str()); mDisplayNames = GLCD::Config.driverConfigs[0].name; } @@ -303,7 +303,7 @@ bool cPluginGraphLCD::ConnectDisplay(unsigned int index, unsigned int displayNum /* if plugin was deactivated -> reactivate */ GraphLCDSetup.PluginActive = 1; - dsyslog("graphlcd plugin: init timeout waiting for display %s thread to get ready", mDisplay[index].Name.c_str()); + dsyslog("graphlcd plugin: DEBUG: Init timeout waiting for display %s thread to get ready", mDisplay[index].Name.c_str()); mDisplay[index].to_timestamp = cTimeMs::Now(); mDisplay[index].Status = CONNECTING; @@ -337,14 +337,14 @@ void cPluginGraphLCD::MainThreadHook() { if (mDisplay[index].Disp->Active()) { - dsyslog("graphlcd plugin: display thread for %s is ready", mDisplay[index].Name.c_str()); + dsyslog("graphlcd plugin: DEBUG: Display thread for %s is ready", mDisplay[index].Name.c_str()); mDisplay[index].Status = CONNECTED; } else { if ( (cTimeMs::Now() - mDisplay[index].to_timestamp) > (uint64_t) 10000) { - dsyslog ("graphlcd plugin: timeout while waiting for display thread %s", mDisplay[index].Name.c_str()); + dsyslog ("graphlcd plugin: DEBUG: Timeout while waiting for display thread %s", mDisplay[index].Name.c_str()); /* no activity after 10 secs: display is unusable */ //GraphLCDSetup.PluginActive = 0; DisconnectDisplay(index); @@ -459,13 +459,13 @@ cString cPluginGraphLCD::SVDRPCommand(const char *Command, const char *Option, i for (unsigned int count = 0; count < 100; count++) { cCondWait::SleepMs(100); if (mDisplay[index].Disp->Active()) { - dsyslog ("graphlcd plugin: display thread ready"); + dsyslog ("graphlcd plugin: DEBUG: Display thread for '%s' ready", mDisplay[index].Name.c_str()); mDisplay[index].Status = CONNECTED; break; } } if (mDisplay[index].Status != CONNECTED) - dsyslog ("graphlcd plugin: timeout while waiting for display thread"); + dsyslog ("graphlcd plugin: DEBUG: Timeout while waiting for display thread '%s'", mDisplay[index].Name.c_str()); } retval.append((mDisplay[index].Status == CONNECTED) ? "CONNECT ok." : "CONNECT error."); @@ -489,17 +489,17 @@ cString cPluginGraphLCD::SVDRPCommand(const char *Command, const char *Option, i for (unsigned int count = 0; count < 100; count++) { cCondWait::SleepMs(100); if (mDisplay[i].Disp->Active()) { - dsyslog ("graphlcd plugin: display thread ready for '%s'", mDisplay[i].Name.c_str()); + dsyslog ("graphlcd plugin: DEBUG: Display thread ready for '%s'", mDisplay[i].Name.c_str()); mDisplay[i].Status = CONNECTED; break; } } if (mDisplay[i].Status != CONNECTED) - dsyslog ("graphlcd plugin: timeout while waiting for display thread '%s'", mDisplay[i].Name.c_str()); + dsyslog ("graphlcd plugin: DEBUG: Timeout while waiting for display thread '%s'", mDisplay[i].Name.c_str()); } if (mDisplay[i].Status != CONNECTED) { - dsyslog ("graphlcd plugin: timeout while waiting for display thread"); + dsyslog ("graphlcd plugin: DEBUG: Timeout while waiting for display thread '%s'", mDisplay[i].Name.c_str()); count_fail ++; } else { count_ok ++; @@ -490,14 +490,14 @@ bool cGraphLCDService::NeedsUpdate(uint64_t CurrentTime) if ((mend = version.find(".", mstart)) != std::string::npos) { numval = atoi(version.substr(mstart, mend-mstart).c_str()); if (numval <= 6) { // version <= 1.6.x - isyslog("graphlcd plugin: femon <= 1.7.7 requires a patch prior to be usable with graphlcd.\n"); - isyslog("graphlcd plugin: see README for further instructions.\n"); + isyslog("graphlcd plugin: INFO: femon <= 1.7.7 requires a patch prior to be usable with graphlcd\n"); + isyslog("graphlcd plugin: INFO: see README for further instructions\n"); } else if (numval == 7) { mstart = mend + 1; numval = atoi(version.substr(mstart).c_str()); // ignore trailing characters if (numval <= 7) { - isyslog("graphlcd plugin: femon <= 1.7.7 requires a patch prior to be usable with graphlcd.\n"); - isyslog("graphlcd plugin: see README for further instructions.\n"); + isyslog("graphlcd plugin: INFO: femon <= 1.7.7 requires a patch prior to be usable with graphlcd\n"); + isyslog("graphlcd plugin: INFO: see README for further instructions\n"); } else { // version >= 1.7.8: ok femonVersionValid = true; } @@ -505,10 +505,10 @@ bool cGraphLCDService::NeedsUpdate(uint64_t CurrentTime) femonVersionValid = true; } } else { - isyslog("graphlcd plugin: unable to decode version information of femon.\n"); + isyslog("graphlcd plugin: INFO: Unable to decode version information of femon\n"); } } else { - isyslog("graphlcd plugin: unable to decode version information of femon.\n"); + isyslog("graphlcd plugin: INFO: Unable to decode version information of femon\n"); } } femonVersionChecked = true; diff --git a/skinconfig.c b/skinconfig.c index 73caf79..465a364 100644 --- a/skinconfig.c +++ b/skinconfig.c @@ -879,7 +879,7 @@ int cGraphLCDSkinConfig::GetTokenId(const std::string & Name) if (Name == Tokens[i]) return i; } - esyslog("graphlcd: unknown token %s", Name.c_str()); + esyslog("graphlcd plugin: ERROR: Unknown token %s", Name.c_str()); return tokCountToken; } |