summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/logging.h
diff options
context:
space:
mode:
authorN Balachandran <nbalacha@redhat.com>2017-07-24 17:48:47 +0530
committerShyamsundar Ranganathan <srangana@redhat.com>2017-08-03 12:04:50 +0000
commit498164fa45309bd314ff2fcc282b140edf72bc22 (patch)
tree352f8e6c7dc924627010e555c63941143ff84e1f /libglusterfs/src/logging.h
parent10da7c37b30f7995bf65dbb4babbbb5216bcc925 (diff)
logging: localtime logging, cmdline, volume set option
Despite the fact that appliances generally use UTC, some users really want log entries in localtime. fixes gluster/glusterfs#272 feature page: https://review.gluster.org/17807 Backport from master https://review.gluster.org/#/c/16911/ Change-Id: I5fbf2c3eedd9eb128fb3f851dd67b2f4081c8bba Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: https://review.gluster.org/17928 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
Diffstat (limited to 'libglusterfs/src/logging.h')
-rw-r--r--libglusterfs/src/logging.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libglusterfs/src/logging.h b/libglusterfs/src/logging.h
index a7f252acf67..fd9a36d15c2 100644
--- a/libglusterfs/src/logging.h
+++ b/libglusterfs/src/logging.h
@@ -116,6 +116,7 @@ typedef struct gf_log_handle_ {
uint32_t timeout;
pthread_mutex_t log_buf_lock;
struct _gf_timer *log_flush_timer;
+ int localtime;
} gf_log_handle_t;
@@ -280,6 +281,8 @@ void gf_log_disable_syslog (void);
void gf_log_enable_syslog (void);
gf_loglevel_t gf_log_get_loglevel (void);
void gf_log_set_loglevel (gf_loglevel_t level);
+int gf_log_get_localtime (void);
+void gf_log_set_localtime (int);
void gf_log_flush (void);
gf_loglevel_t gf_log_get_xl_loglevel (void *xl);
void gf_log_set_xl_loglevel (void *xl, gf_loglevel_t level);