[ 
https://issues.apache.org/jira/browse/CASSANDRA-10241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14737607#comment-14737607
 ] 

Paulo Motta commented on CASSANDRA-10241:
-----------------------------------------

Attaching 2.1 and 2.2+ github patches.

Main changes:
* Created {{AsyncAppender}} ({{ASYNCDEBUGLOG}}) that writes all {{DEBUG}} and 
{{TRACE}} logs to {{$cassandra.logdir/debug.log}}
** Choice of {{AsyncAppender}} for debugging logs was based on CASSANDRA-9376.
* Modified {{SYSTEMLOG}} (former {{FILE}} appender) and {{STDOUT}} appenders to 
filter out {{DEBUG}} and {{TRACE}} messages, so debugging messages don't 
pollute human-readable {{system.log}} or stdout output.
* Kept {{SYSTEMLOG}} appender (former {{FILE}} appender) as 
{{RollingFileAppender}}, to guarantee {{WARN}} and {{ERROR}} messages will be 
written synchronously to {{system.log}} (during a crash, for example).
* Added shutdown hook to guarantee {{ASYNCDEBUGLOG}} flushes on orderly JVM 
shutdown.
* Added configurable {{logback.xml}} property {{TROUBLESHOOTING_LEVEL}}, which 
defines the logging level of the following classes:
** config
** gms
** repair
** service
** streaming
* By default, {{TROUBLESHOOTING_LEVEL}} is set to {{INFO}}, which keeps the 
current behavior of logging only to {{system.log}}, but operators can 
dynamically change it to {{DEBUG}} or {{TRACE}} to populate {{debug.log}} with 
troubleshooting logs from these classes.

Tests:
* [2.1 
dtests|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-2.1-10241-dtest/]
* [2.1 
testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-2.1-10241-testall/]
* [2.2 
dtests|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-2.2-10241-dtest/]
* [2.2 
testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-2.2-10241-testall/]
* [3.0 
dtests|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-3.0-10241-dtest/]
* [3.0 
testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-3.0-10241-testall/]
* [trunk 
dtests|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-trunk-10241-dtest/]
* [trunk 
testall|http://cassci.datastax.com/view/Dev/view/paulomotta/job/pauloricardomg-trunk-10241-testall/]

> Keep a separate production debug log for troubleshooting
> --------------------------------------------------------
>
>                 Key: CASSANDRA-10241
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10241
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Config
>            Reporter: Jonathan Ellis
>            Assignee: Paulo Motta
>             Fix For: 2.1.x
>
>
> [~aweisberg] had the suggestion to keep a separate debug log for aid in 
> troubleshooting, not intended for regular human consumption but where we can 
> log things that might help if something goes wrong.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to