diff options
| author | Mohamed Ashiq <ashiq333@gmail.com> | 2015-05-19 15:46:01 +0530 | 
|---|---|---|
| committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2015-06-26 22:52:01 -0700 | 
| commit | 2b9b3ef3b646989bbc0412dca187b3f5fcad3283 (patch) | |
| tree | 6426321e1e0ac95e8afb12ab3e3047b7625e18a0 /libglusterfs/src/syncop-utils.c | |
| parent | f5f5cef19e2afa1e2bcee896269e004353d3180f (diff) | |
mem-pool,stack,store,syncop,timer/libglusterfs : Porting to a new logging framework
Change-Id: Idd3dcaf7eeea5207b3a5210676ce3df64153197f
BUG: 1194640
Signed-off-by: Mohamed Ashiq <ashiq333@gmail.com>
Reviewed-on: http://review.gluster.org/10827
Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Diffstat (limited to 'libglusterfs/src/syncop-utils.c')
| -rw-r--r-- | libglusterfs/src/syncop-utils.c | 21 | 
1 files changed, 11 insertions, 10 deletions
diff --git a/libglusterfs/src/syncop-utils.c b/libglusterfs/src/syncop-utils.c index 81393136abb..ce60ef0c153 100644 --- a/libglusterfs/src/syncop-utils.c +++ b/libglusterfs/src/syncop-utils.c @@ -10,6 +10,7 @@  #include "syncop.h"  #include "common-utils.h" +#include "libglusterfs-messages.h"  int  syncop_dirfd (xlator_t *subvol, loc_t *loc, fd_t **fd, int pid) @@ -22,9 +23,9 @@ syncop_dirfd (xlator_t *subvol, loc_t *loc, fd_t **fd, int pid)          dirfd = fd_create (loc->inode, pid);          if (!dirfd) { -                gf_log (subvol->name, GF_LOG_ERROR, -                        "fd_create of %s failed: %s", -                        uuid_utoa (loc->gfid), strerror(errno)); +                gf_msg (subvol->name, GF_LOG_ERROR, errno, +                        LG_MSG_FD_CREATE_FAILED, "fd_create of %s", +                        uuid_utoa (loc->gfid));                  ret = -errno;                  goto out;          } @@ -44,18 +45,18 @@ syncop_dirfd (xlator_t *subvol, loc_t *loc, fd_t **fd, int pid)                  fd_unref (dirfd);                  dirfd = fd_anonymous (loc->inode);                  if (!dirfd) { -                        gf_log(subvol->name, GF_LOG_ERROR, -                               "fd_anonymous of %s failed: %s", -                               uuid_utoa (loc->gfid), strerror(errno)); +                        gf_msg (subvol->name, GF_LOG_ERROR, errno, +                                LG_MSG_FD_ANONYMOUS_FAILED, "fd_anonymous of " +                                "%s", uuid_utoa (loc->gfid));                          ret = -errno;                          goto out;                  }                  ret = 0;  #else /* GF_LINUX_HOST_OS */                  fd_unref (dirfd); -                gf_log (subvol->name, GF_LOG_ERROR, -                        "opendir of %s failed: %s", -                        uuid_utoa (loc->gfid), strerror(errno)); +                gf_msg (subvol->name, GF_LOG_ERROR, errno, +                        LG_MSG_DIR_OP_FAILED, "opendir of %s", +                        uuid_utoa (loc->gfid));                  goto out;  #endif /* GF_LINUX_HOST_OS */          } @@ -299,7 +300,7 @@ syncop_is_subvol_local (xlator_t *this, loc_t *loc, gf_boolean_t *is_local)          ret = glusterfs_is_local_pathinfo (pathinfo, is_local); -        gf_log (this->name, GF_LOG_DEBUG, "subvol %s is %slocal", +        gf_msg_debug (this->name, 0, "subvol %s is %slocal",                  this->name, is_local ? "" : "not ");  out:  | 
