Introduce new log level GF_LOG_TRACE.
TRACE is the most verbose log level, meant to have a full trace of operation. Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
This commit is contained in:
parent
174872b364
commit
b52a5a408b
@ -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;
|
||||
|
@ -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) {
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user