From: František Dvořák Date: Wed, 7 Jul 2010 17:37:00 +0000 (+0000) Subject: Disable logging through log4c in harvester (launched without startup script). X-Git-Tag: glite-jobid-api-c_R_1_0_5_1~33 X-Git-Url: http://scientific.zcu.cz/git/?a=commitdiff_plain;h=05ffedb1d572b5f775468f36bffb9baa31df92dc;p=jra1mw.git Disable logging through log4c in harvester (launched without startup script). --- diff --git a/org.glite.lb.harvester/src/harvester.c b/org.glite.lb.harvester/src/harvester.c index da0ec6b..d42ec1d 100644 --- a/org.glite.lb.harvester/src/harvester.c +++ b/org.glite.lb.harvester/src/harvester.c @@ -35,7 +35,7 @@ limitations under the License. #include #include #include -#ifdef WITH_OLD_LB +#if defined(WITH_OLD_LB) || !defined(USE_LOG4C) #include #endif #include @@ -225,7 +225,7 @@ typedef struct { static const char rcsid[] = "@(#)$Id$"; -#ifdef WITH_OLD_LB +#if defined(WITH_OLD_LB) || !defined(USE_LOG4C) static int rtm2syslog[] = { LOG_ERR, LOG_WARNING, @@ -332,7 +332,7 @@ void lvprintf_func(thread_t *t, const char *description, int level, const char * if (level <= WRN && !config.daemonize) fprintf(stderr, RTM_TTY_RED); if (config.daemonize) { -#ifdef WITH_OLD_LB +#if defined(WITH_OLD_LB) || !defined(USE_LOG4C) openlog(NULL, LOG_PID | LOG_CONS, LOG_DAEMON); syslog(rtm2syslog[level], "%s", line); closelog(); @@ -2740,7 +2740,7 @@ quit: if (config.pidfile && !config.guard) { if (remove(config.pidfile) == -1) lprintf(NULL, WRN, "can't remove pidfile '%s': %s", config.pidfile, strerror(errno)); } -#ifdef WITH_OLD_LB +#ifndef WITH_OLD_LB if (config.daemonize) glite_common_log_fini(); #endif