summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/libglusterfs-messages.h26
-rw-r--r--libglusterfs/src/run.c4
-rw-r--r--libglusterfs/src/timespec.c5
-rw-r--r--libglusterfs/src/xlator.c10
4 files changed, 34 insertions, 11 deletions
diff --git a/libglusterfs/src/libglusterfs-messages.h b/libglusterfs/src/libglusterfs-messages.h
index 25cca8bac3e..68754e6b869 100644
--- a/libglusterfs/src/libglusterfs-messages.h
+++ b/libglusterfs/src/libglusterfs-messages.h
@@ -36,7 +36,7 @@
*/
#define GLFS_LG_BASE GLFS_MSGID_COMP_LIBGLUSTERFS
-#define GLFS_LG_NUM_MESSAGES 201
+#define GLFS_LG_NUM_MESSAGES 204
#define GLFS_LG_MSGID_END (GLFS_LG_BASE + GLFS_LG_NUM_MESSAGES + 1)
/* Messaged with message IDs */
#define glfs_msg_start_lg GLFS_LG_BASE, "Invalid: Start of messages"
@@ -1722,6 +1722,30 @@
* @recommendedaction
*
*/
+#define LG_MSG_SET_LOG_LEVEL (GLFS_LG_BASE + 202)
+
+/*!
+ * @messageid
+ * @diagnosis
+ * @recommendedaction
+ *
+ */
+#define LG_MSG_VERIFY_PLATFORM (GLFS_LG_BASE + 203)
+
+/*!
+ * @messageid
+ * @diagnosis
+ * @recommendedaction
+ *
+ */
+#define LG_MSG_RUNNER_LOG (GLFS_LG_BASE + 204)
+
+/*!
+ * @messageid
+ * @diagnosis
+ * @recommendedaction
+ *
+ */
/*------------*/
#define glfs_msg_end_lg GLFS_LG_MSGID_END, "Invalid: End of messages"
diff --git a/libglusterfs/src/run.c b/libglusterfs/src/run.c
index 5d7f1d207b1..6018a58ad5f 100644
--- a/libglusterfs/src/run.c
+++ b/libglusterfs/src/run.c
@@ -43,8 +43,8 @@
#include "common-utils.h"
#endif
+#include "libglusterfs-messages.h"
#include "run.h"
-
void
runinit (runner_t *runner)
{
@@ -187,7 +187,7 @@ runner_log (runner_t *runner, const char *dom, gf_loglevel_t lvl,
if (len > 0)
buf[len - 1] = '\0';
- gf_log_callingfn (dom, lvl, "%s: %s", msg, buf);
+ gf_msg_callingfn (dom, lvl, 0, LG_MSG_RUNNER_LOG, "%s: %s", msg, buf);
GF_FREE (buf);
}
diff --git a/libglusterfs/src/timespec.c b/libglusterfs/src/timespec.c
index 5242ecc8cd0..f7b2bea2f30 100644
--- a/libglusterfs/src/timespec.c
+++ b/libglusterfs/src/timespec.c
@@ -20,6 +20,7 @@ static mach_timebase_info_data_t gf_timebase;
#include "logging.h"
#include "timespec.h"
+#include "libglusterfs-messages.h"
void timespec_now (struct timespec *ts)
{
@@ -51,10 +52,6 @@ void timespec_now (struct timespec *ts)
ts->tv_nsec = (time - (ts->tv_sec * GIGA));
#endif /* Platform verification */
- /*
- gf_log_callingfn ("timer", GF_LOG_TRACE, "%"GF_PRI_TIME".%09"GF_PRI_TIME,
- ts->tv_sec, ts->tv_nsec);
- */
}
void timespec_adjust_delta (struct timespec *ts, struct timespec delta)
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c
index 76077c7a360..30775354253 100644
--- a/libglusterfs/src/xlator.c
+++ b/libglusterfs/src/xlator.c
@@ -976,8 +976,8 @@ is_gf_log_command (xlator_t *this, const char *name, char *value)
/* Some crude way to change the log-level of process */
if (!strcmp (name, "trusted.glusterfs.set-log-level")) {
- /* */
- gf_log ("glusterfs", gf_log_get_loglevel(),
+ gf_msg ("glusterfs", gf_log_get_loglevel(), 0,
+ LG_MSG_SET_LOG_LEVEL,
"setting log level to %d (old-value=%d)",
log_level, gf_log_get_loglevel());
gf_log_set_loglevel (log_level);
@@ -987,7 +987,8 @@ is_gf_log_command (xlator_t *this, const char *name, char *value)
if (!strcmp (name, "trusted.glusterfs.fuse.set-log-level")) {
/* */
- gf_log (this->name, gf_log_get_xl_loglevel (this),
+ gf_msg (this->name, gf_log_get_xl_loglevel (this), 0,
+ LG_MSG_SET_LOG_LEVEL,
"setting log level to %d (old-value=%d)",
log_level, gf_log_get_xl_loglevel (this));
gf_log_set_xl_loglevel (this, log_level);
@@ -1006,7 +1007,8 @@ is_gf_log_command (xlator_t *this, const char *name, char *value)
snprintf (key, 1024, "trusted.glusterfs.%s.set-log-level",
trav->name);
if (fnmatch (name, key, FNM_NOESCAPE) == 0) {
- gf_log (trav->name, gf_log_get_xl_loglevel (trav),
+ gf_msg (trav->name, gf_log_get_xl_loglevel (trav), 0,
+ LG_MSG_SET_LOG_LEVEL,
"setting log level to %d (old-value=%d)",
log_level, gf_log_get_xl_loglevel (trav));
gf_log_set_xl_loglevel (trav, log_level);