Can't find way to change log level for some logs

logging

#1

Good day sirs,
I have in use version couchbase - 5.5.2 community edition

All couchbase logs filled with debug and info level, so i want to change this to reduce the amount of writing to disk

i looked throught google and can’t find any information about how to change log levels except this:
https://docs.couchbase.com/server/5.5/clustersetup/ui-logs.html#manage-logs

with “static” way (modifying static_config) i can’t change log level:
ns_server:warn “not overriding parameter $PARAM, which is given from command line” (many lines with PARAM - like: loglevel_error_logger, loglevel_ns_server and all another from static_config)
this is not my variant or i can make it work?

docs says about “dynamical” way:
" The available loggers are ns_server , couchdb , user , Menelaus , ns_doctor , stats , rebalance , cluster , views, mapreduce_errors , xdcr and error_logger ."

i added in systemd service ExecStartPost script:

set_loglevel() {
curl -X POST -u $CB_USER:CB_PASS {CB_HOST}:8091/diag/eval -d “ale:set_loglevel($1,error)” ;
}

LOGS=‘ns_server error_logger user menelaus ns_doctor stats rebalance cluster xdcr access couchdb views mapreduce_errors’
echo
for name in $LOGS ; do
echo ‘’
echo “set_loglevel($name,error)”;
set_loglevel $name
done

with that script i got:

set_loglevel(ns_server,error)
ok
set_loglevel(error_logger,error)
ok
set_loglevel(user,error)
ok
set_loglevel(menelaus,error)
ok
set_loglevel(ns_doctor,error)
ok
set_loglevel(stats,error)
ok
set_loglevel(rebalance,error)
ok
set_loglevel(cluster,error)
ok
set_loglevel(xdcr,error)
ok
set_loglevel(access,error)
ok
set_loglevel(couchdb,error)
{error,unknown_logger}
set_loglevel(views,error)
{error,unknown_logger}
set_loglevel(mapreduce_errors,error)
{error,unknown_logger}

so couchdb, views and mapreduce_errors log level can’t be changed via /diag/eval, right?

there is still many info in logs:
metakv.log DEBUG level
goxdcr.log INFO level
query.log INFO level
projector.log INFO level
json_rpc.log DEBUG level
babysitter.log INFO level
and etc.

i found mentions couchdb log level in section [log] in /opt/couchbase/etc/couchdb/default.ini
and set
curl -s -X POST -u $CB_USER:CB_PASS \ {CB_HOST}:8091/settings/indexes
-d “logLevel=error”

what can i do else?

sorry for bothering and thanks for answers


#2

This post was flagged by the community and is temporarily hidden.


#3

I do not have an answer, but I recently filed two related bugs you may want to track. DOC-4380 and MB-31913.


#4

thanks for reply, i will tracking