From fff2952d5f48211f886924b2fe45949c6715c510 Mon Sep 17 00:00:00 2001 From: Robb Kistler Date: Wed, 25 Nov 2015 13:46:24 -0800 Subject: [PATCH] Fix syslog level used by S3FS_PRN_EXIT() Without converting from s3fs log levels to syslog levels, the syslog ends up being LOG_EMERG which can cause a broadcast message to all users. --- src/common.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common.h b/src/common.h index ee80603..013ad35 100644 --- a/src/common.h +++ b/src/common.h @@ -85,7 +85,8 @@ enum s3fs_log_level{ if(foreground){ \ fprintf(stderr, "s3fs: " fmt "%s\n", __VA_ARGS__); \ }else{ \ - syslog(S3FS_LOG_CRIT, "s3fs: " fmt "%s", __VA_ARGS__); \ + fprintf(stderr, "s3fs: " fmt "%s\n", __VA_ARGS__); \ + syslog(S3FS_LOG_LEVEL_TO_SYSLOG(S3FS_LOG_CRIT), "s3fs: " fmt "%s", __VA_ARGS__); \ } // [NOTE]