mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-3263 - ActiveMQ LoggingBrokerPlugin too verbose. add logSessionEvents attribute to split connection and session info. Patch applied with thanks
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1088631 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1760d1aefb
commit
951d87066c
|
@ -58,13 +58,13 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
|
||||||
private boolean logAll = false;
|
private boolean logAll = false;
|
||||||
private boolean logMessageEvents = false;
|
private boolean logMessageEvents = false;
|
||||||
private boolean logConnectionEvents = true;
|
private boolean logConnectionEvents = true;
|
||||||
|
private boolean logSessionEvents = true;
|
||||||
private boolean logTransactionEvents = false;
|
private boolean logTransactionEvents = false;
|
||||||
private boolean logConsumerEvents = false;
|
private boolean logConsumerEvents = false;
|
||||||
private boolean logProducerEvents = false;
|
private boolean logProducerEvents = false;
|
||||||
private boolean logInternalEvents = false;
|
private boolean logInternalEvents = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
* @org.apache.xbean.InitMethod
|
* @org.apache.xbean.InitMethod
|
||||||
*/
|
*/
|
||||||
|
@ -100,12 +100,23 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Logger Events that are related to connections and sessions
|
* Logger Events that are related to connections
|
||||||
*/
|
*/
|
||||||
public void setLogConnectionEvents(boolean logConnectionEvents) {
|
public void setLogConnectionEvents(boolean logConnectionEvents) {
|
||||||
this.logConnectionEvents = logConnectionEvents;
|
this.logConnectionEvents = logConnectionEvents;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isLogSessionEvents() {
|
||||||
|
return logSessionEvents;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Logger Events that are related to sessions
|
||||||
|
*/
|
||||||
|
public void setLogSessionEvents(boolean logSessionEvents) {
|
||||||
|
this.logSessionEvents = logSessionEvents;
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isLogTransactionEvents() {
|
public boolean isLogTransactionEvents() {
|
||||||
return logTransactionEvents;
|
return logTransactionEvents;
|
||||||
}
|
}
|
||||||
|
@ -367,7 +378,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addSession(ConnectionContext context, SessionInfo info) throws Exception {
|
public void addSession(ConnectionContext context, SessionInfo info) throws Exception {
|
||||||
if (isLogAll() || isLogConnectionEvents()) {
|
if (isLogAll() || isLogSessionEvents()) {
|
||||||
LOG.info("Adding Session : " + info);
|
LOG.info("Adding Session : " + info);
|
||||||
}
|
}
|
||||||
super.addSession(context, info);
|
super.addSession(context, info);
|
||||||
|
@ -375,7 +386,7 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void removeSession(ConnectionContext context, SessionInfo info) throws Exception {
|
public void removeSession(ConnectionContext context, SessionInfo info) throws Exception {
|
||||||
if (isLogAll() || isLogConnectionEvents()) {
|
if (isLogAll() || isLogSessionEvents()) {
|
||||||
LOG.info("Removing Session : " + info);
|
LOG.info("Removing Session : " + info);
|
||||||
}
|
}
|
||||||
super.removeSession(context, info);
|
super.removeSession(context, info);
|
||||||
|
@ -580,6 +591,8 @@ public class LoggingBrokerPlugin extends BrokerPluginSupport {
|
||||||
buf.append(isLogAll());
|
buf.append(isLogAll());
|
||||||
buf.append(", logConnectionEvents=");
|
buf.append(", logConnectionEvents=");
|
||||||
buf.append(isLogConnectionEvents());
|
buf.append(isLogConnectionEvents());
|
||||||
|
buf.append(", logSessionEvents=");
|
||||||
|
buf.append(isLogSessionEvents());
|
||||||
buf.append(", logConsumerEvents=");
|
buf.append(", logConsumerEvents=");
|
||||||
buf.append(isLogConsumerEvents());
|
buf.append(isLogConsumerEvents());
|
||||||
buf.append(", logProducerEvents=");
|
buf.append(", logProducerEvents=");
|
||||||
|
|
Loading…
Reference in New Issue