[icinga-checkins] icinga.org: icinga-core/test/ido: idoutils: replace sensless debug output with syslog when ido2db starts without logfile open

git at icinga.org git at icinga.org
Wed Feb 22 10:41:11 CET 2012


Module: icinga-core
Branch: test/ido
Commit: 62754f521676debbb17c67f07fa84b2e3741d6f9
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=62754f521676debbb17c67f07fa84b2e3741d6f9

Author: Thomas Dressler <tdressler at tdressler.net>
Date:   Sun Feb  5 19:11:48 2012 +0100

idoutils: replace sensless debug output with syslog when ido2db starts without logfile open

---

 module/idoutils/src/ido2db.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/module/idoutils/src/ido2db.c b/module/idoutils/src/ido2db.c
index 96c42fc..eccb860 100644
--- a/module/idoutils/src/ido2db.c
+++ b/module/idoutils/src/ido2db.c
@@ -259,19 +259,20 @@ int main(int argc, char **argv) {
 	/******************************/
 #ifdef USE_ORACLE /* Oracle ocilib specific */
 
-	ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ido2db with ocilib() driver compiled\n");
+
 	/* at this stage, is oci driver not loaded, but loading will be later in db_init.
 	 * check will try to init,read variables and cleanup afterwards
 	 */
 	if (OCI_Initialize(NULL,NULL,OCI_ENV_DEFAULT)) {
 	    v1=OCI_GetOCIRuntimeVersion();
 	    v2=OCI_GetOCICompileVersion();
-	    ido2db_log_debug_info(IDO2DB_DEBUGL_PROCESSINFO, 2, "ocilib() driver check OK(Runtime:%u,CompileTime:%u)\n",
+	    syslog(LOG_INFO, "OCILIB driver check OK(OCI Version:%u,CompileTime:%u)",
 	        v1,v2);
 	    /* we need to cleanup to succeed ido2db_db_init */
 	        OCI_Cleanup();
 	}else{
-	        printf("Cannot initialize ocilib, exit!\n");
+	        printf("Cannot initialize OCILIB, exiting!\n");
+	        syslog(LOG_ERR,"Cannot initialize OCILIB, exiting!");
 	        exit (1);
 	}
 





More information about the icinga-checkins mailing list