You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jackson Chung (JIRA)" <ji...@apache.org> on 2014/04/25 22:04:15 UTC
[jira] [Updated] (CASSANDRA-7090) Add ability to set/get logging
levels to nodetool
[ https://issues.apache.org/jira/browse/CASSANDRA-7090?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jackson Chung updated CASSANDRA-7090:
-------------------------------------
Attachment: patch-7090.v20
attaching a v2.0 version (since we won't be using 2.1 soon, our next upgrade is 2.0)
sample nodetool output (obviously the real value is the logging actually work, and it does)
{noformat}
jackson@faranth:~/work/cassandra-2.0$ ./bin/nodetool getLoggingLevels
Logger Name Log Level
root INFO
org.apache.thrift.server.TNonblockingServer ERROR
jackson@faranth:~/work/cassandra-2.0$ ./bin/nodetool setlogginglevel org.apache.cassandra.gms TRACE
jackson@faranth:~/work/cassandra-2.0$ ./bin/nodetool setlogginglevel org.apache.cassandra.service DEBUG
jackson@faranth:~/work/cassandra-2.0$ ./bin/nodetool getLoggingLevels
Logger Name Log Level
root INFO
org.apache.cassandra.service DEBUG
org.apache.thrift.server.TNonblockingServer ERROR
org.apache.cassandra.gms TRACE
jackson@faranth:~/work/cassandra-2.0$ ./bin/nodetool setlogginglevel org.apache.cassandra.service
jackson@faranth:~/work/cassandra-2.0$ ./bin/nodetool getLoggingLevels
Logger Name Log Level
root INFO
org.apache.thrift.server.TNonblockingServer ERROR
org.apache.cassandra.gms TRACE
jackson@faranth:~/work/cassandra-2.0$ ./bin/nodetool setlogginglevel org.apache.cassandra.db BLAH
jackson@faranth:~/work/cassandra-2.0$ ./bin/nodetool getLoggingLevels
Logger Name Log Level
root INFO
org.apache.thrift.server.TNonblockingServer ERROR
org.apache.cassandra.db DEBUG
org.apache.cassandra.gms TRACE
jackson@faranth:~/work/cassandra-2.0$ ./bin/nodetool setlogginglevel
jackson@faranth:~/work/cassandra-2.0$ ./bin/nodetool getLoggingLevels
Logger Name Log Level
root INFO
org.apache.thrift.server.TNonblockingServer ERROR
{noformat}
> Add ability to set/get logging levels to nodetool
> --------------------------------------------------
>
> Key: CASSANDRA-7090
> URL: https://issues.apache.org/jira/browse/CASSANDRA-7090
> Project: Cassandra
> Issue Type: Improvement
> Reporter: Jackson Chung
> Priority: Minor
> Attachments: logging.diff, patch-7090.v20
>
>
> While it is nice to use logback (per #CASSANDRA-5883) and with the autoreload feature, in some cases ops/admin may not have the permission or ability to modify the configuration file(s). Or the files are controlled by puppet/chef so it is not desirable to modify them manually.
> There is already an existing operation for setLoggingLevel in the StorageServuceMBean , so that's easy to expose that to the nodetool
> But what was lacking was ability to see the current log level settings for various loggers.
> The attached diff aims to do 3 things:
> # add JMX getLoggingLevels --> return a map of current loggers and the corresponding levels
> # expose both getLoggingLevels and setLoggingLevel to nodetool. In particular, the setLoggingLevel behave as follows:
> #* If both classQualifer and level are empty/null, it will reload the configuration to reset.
> #* If classQualifer is not empty but level is empty/null, it will set the level to null for the defined classQualifer
> #* The logback configuration should have < jmxConfigurator /> set
> The diff is based on the master branch which uses logback, soit is not applicable to 2.0 or 1.2. (2.1 is ok) Though it would be nice to have the same ability for 2.0.
--
This message was sent by Atlassian JIRA
(v6.2#6252)