diff options
author | Ravishankar N <ravishankar@redhat.com> | 2018-10-26 17:51:38 +0530 |
---|---|---|
committer | Ravishankar N <ravishankar@redhat.com> | 2018-11-28 10:15:18 +0000 |
commit | 2436286634e069639975f7b5c973f859a87de233 (patch) | |
tree | 0e4418dde5f9cde3c171cb24440c84a66e11c275 /cli/src/cli.h | |
parent | c12ded9ebf41c1f3bacda98a20b165a413740b2e (diff) |
glfsheal: add a '--nolog' flag
....and if set, change the log level to GF_LOG_NONE. This is useful for
monitoring applications which invoke the heal info set of commands once
every minute, leading to un-necessary glfsheal* logs in
/var/log/glusterfs/. For example, we can now run
`gluster volume heal <VOLNAME> info --nolog`
`gluster volume heal <VOLNAME> info split-brain --nolog` etc.
The default log level is still retained at GF_LOG_INFO.
The patch also changes glfsheal internally to accept '--xml' instead of 'xml'.
Note: The --nolog flag is *not* displayed in the help anywhere, for the
sake of consistency in how the other flags are not displayed anywhere in
the help.
fixes: bz#1654236
Change-Id: Ia08b6aa6e4a0548379db7e313dd4411ebc66f206
Signed-off-by: Ravishankar N <ravishankar@redhat.com>
(cherry picked from commit fc9889d0373c323aab0d93f8ca31d2d8151bd041)
Diffstat (limited to 'cli/src/cli.h')
-rw-r--r-- | cli/src/cli.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/cli/src/cli.h b/cli/src/cli.h index bf51402dc17..773297e4be8 100644 --- a/cli/src/cli.h +++ b/cli/src/cli.h @@ -61,6 +61,7 @@ typedef enum { #define GLUSTER_MODE_XML (1 << 2) #define GLUSTER_MODE_WIGNORE (1 << 3) #define GLUSTER_MODE_WIGNORE_PARTITION (1 << 4) +#define GLUSTER_MODE_GLFSHEAL_NOLOG (1 << 5) #define GLUSTERD_GET_QUOTA_LIST_MOUNT_PATH(abspath, volname, path) \ do { \ |