diff options
| author | Krutika Dhananjay <kdhananj@redhat.com> | 2014-03-11 15:05:44 +0530 | 
|---|---|---|
| committer | Vijay Bellur <vbellur@redhat.com> | 2014-04-11 18:00:54 -0700 | 
| commit | 712541cdefcc9614e5a79f628358f205ceda6e55 (patch) | |
| tree | d2ba17083d16f1cacc80c7498ba0534d7ef16baf /libglusterfs/src/logging.h | |
| parent | e73af16885f6d11ebcb225edb4d12214ceeba74c (diff) | |
logging: Make logger and log format configurable through cli
Change-Id: Ic4b701a6621578848ff67ae4ecb5a10b5f32f93b
BUG: 1075611
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
Reviewed-on: http://review.gluster.org/7372
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'libglusterfs/src/logging.h')
| -rw-r--r-- | libglusterfs/src/logging.h | 12 | 
1 files changed, 12 insertions, 0 deletions
diff --git a/libglusterfs/src/logging.h b/libglusterfs/src/logging.h index b6b13fbd02a..210602c3210 100644 --- a/libglusterfs/src/logging.h +++ b/libglusterfs/src/logging.h @@ -48,6 +48,12 @@  #define LOG_DEBUG   7           /* debug-level messages */  #endif +#define GF_LOG_FORMAT_NO_MSG_ID       "no-msg-id" +#define GF_LOG_FORMAT_WITH_MSG_ID     "with-msg-id" + +#define GF_LOGGER_GLUSTER_LOG         "gluster-log" +#define GF_LOGGER_SYSLOG              "syslog" +  typedef enum {          GF_LOG_NONE,          GF_LOG_EMERG, @@ -254,6 +260,12 @@ void set_sys_log_level (gf_loglevel_t level);  int gf_log_fini(void *data); +void +gf_log_set_logger (gf_log_logger_t logger); + +void +gf_log_set_logformat (gf_log_format_t format); +  #define GF_DEBUG(xl, format, args...)                           \          gf_log ((xl)->name, GF_LOG_DEBUG, format, ##args)  #define GF_INFO(xl, format, args...)                            \  | 
