summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--glusterfsd/src/glusterfsd.c4
-rw-r--r--libglusterfs/src/logging.c6
-rw-r--r--libglusterfs/src/logging.h3
3 files changed, 9 insertions, 4 deletions
diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c
index aef02382727..8a9a5bf05c4 100644
--- a/glusterfsd/src/glusterfsd.c
+++ b/glusterfsd/src/glusterfsd.c
@@ -705,6 +705,10 @@ parse_opts (int key, char *arg, struct argp_state *state)
cmd_args->log_level = GF_LOG_DEBUG;
break;
}
+ if (strcasecmp (arg, ARGP_LOG_LEVEL_TRACE_OPTION) == 0) {
+ cmd_args->log_level = GF_LOG_TRACE;
+ break;
+ }
argp_failure (state, -1, 0, "unknown log level %s", arg);
break;
diff --git a/libglusterfs/src/logging.c b/libglusterfs/src/logging.c
index 9a50122c2d0..cb1ba5b5af5 100644
--- a/libglusterfs/src/logging.c
+++ b/libglusterfs/src/logging.c
@@ -134,13 +134,13 @@ _gf_log (const char *domain, const char *file, const char *function, int line,
time_t utime = 0;
struct tm *tm = NULL;
char timestr[256];
- static char *level_strings[] = {"N", /* NONE */
- "T", /* TRACE */
+ static char *level_strings[] = {"", /* NONE */
"C", /* CRITICAL */
"E", /* ERROR */
"W", /* WARNING */
- "N", /* TRACE (GF_LOG_NORMAL) */
+ "N", /* NORMAL */
"D", /* DEBUG */
+ "T", /* TRACE */
""};
if (!domain || !file || !function || !fmt) {
diff --git a/libglusterfs/src/logging.h b/libglusterfs/src/logging.h
index ecd70d09a2c..d2347c02ba8 100644
--- a/libglusterfs/src/logging.h
+++ b/libglusterfs/src/logging.h
@@ -74,7 +74,8 @@ typedef enum {
GF_LOG_WARNING, /* info about normal operation */
GF_LOG_INFO, /* Normal information */
#define GF_LOG_NORMAL GF_LOG_INFO
- GF_LOG_DEBUG, /* all other junk */
+ GF_LOG_DEBUG, /* internal errors */
+ GF_LOG_TRACE, /* full trace of operation */
} gf_loglevel_t;
#define GF_LOG_MAX GF_LOG_DEBUG