From 05ffedb1d572b5f775468f36bffb9baa31df92dc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Franti=C5=A1ek=20Dvo=C5=99=C3=A1k?= Date: Wed, 7 Jul 2010 17:37:00 +0000 Subject: [PATCH] Disable logging through log4c in harvester (launched without startup script). --- org.glite.lb.harvester/src/harvester.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 -- 1.8.2.3