summaryrefslogtreecommitdiffstats
path: root/xlators/debug/io-stats/src/io-stats.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/debug/io-stats/src/io-stats.c')
-rw-r--r--xlators/debug/io-stats/src/io-stats.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c
index 101e403..b9422c0 100644
--- a/xlators/debug/io-stats/src/io-stats.c
+++ b/xlators/debug/io-stats/src/io-stats.c
@@ -3705,19 +3705,23 @@ xlator_set_loglevel(xlator_t *this, int log_level)
active = ctx->active;
top = active->first;
- if (strcmp(top->type, "protocol/server") || (log_level == -1))
+ if (log_level == -1)
return;
- /* Set log-level for server xlator */
- top->loglevel = log_level;
+ if (ctx->cmd_args.brick_mux) {
+ /* Set log-level for all brick xlators */
+ top->loglevel = log_level;
- /* Set log-level for parent xlator */
- if (this->parents)
- this->parents->xlator->loglevel = log_level;
+ /* Set log-level for parent xlator */
+ if (this->parents)
+ this->parents->xlator->loglevel = log_level;
- while (trav) {
- trav->loglevel = log_level;
- trav = trav->next;
+ while (trav) {
+ trav->loglevel = log_level;
+ trav = trav->next;
+ }
+ } else {
+ gf_log_set_loglevel(this->ctx, log_level);
}
}