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

Andy chen sanjie.cyg at taobao.com
Fri Oct 14 04:55:38 CEST 2011


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

Signed-off-by: Andy chen <sanjie.cyg at taobao.com>
Signed-off-by: Yibin Shen <zituan 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.7




More information about the sheepdog mailing list