[Sheepdog] [PATCH 1/5] logger: reset openlog option

Andychen sanjie.cyg at taobao.com
Wed Oct 12 17:55:30 CEST 2011


From: Andy chen <sanjie.cyg at taobao.com>

if openlog option set to '0', the result is undefined,
so set the openlog() option to 'LOG_CONS | LOG_PID'

Signed-off-by: Andychen <sanjie.cyg at taobao.com>
---
 lib/logger.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/logger.c b/lib/logger.c
index 318b557..5fbbd75 100644
--- a/lib/logger.c
+++ b/lib/logger.c
@@ -393,7 +393,7 @@ int log_init(char *program_name, int size, int is_daemon, int level, char *outfi
 			}
 		} else {
 			fd = -1;
-			openlog(log_name, 0, LOG_DAEMON);
+			openlog(log_name, LOG_CONS | LOG_PID, LOG_DAEMON);
 			setlogmask (LOG_UPTO (LOG_DEBUG));
 		}
 
-- 
1.7.6.4




More information about the sheepdog mailing list