Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlyn Normington2010-06-22 07:05:47 -0400
committerGlyn Normington2010-06-22 07:05:47 -0400
commit2a717bd9587edc4108be030621a7276e32f03c7e (patch)
treeb9f7fd8234bf1044da1e4efc3a8fd00c9869ecf2
parente12fd8b1b81ee2a252814ff3b982f90b0524d283 (diff)
downloadorg.eclipse.virgo.medic-2a717bd9587edc4108be030621a7276e32f03c7e.tar.gz
org.eclipse.virgo.medic-2a717bd9587edc4108be030621a7276e32f03c7e.tar.xz
org.eclipse.virgo.medic-2a717bd9587edc4108be030621a7276e32f03c7e.zip
optimise logging by avoiding cflowbelow and not logging entry/exit for getters, setters, and in repository
-rw-r--r--org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/dump/impl/DumpContributorPublisher.java2
-rw-r--r--org.eclipse.virgo.medic.weaving/src/main/java/org/eclipse/virgo/medic/log/impl/logback/LoggingInterceptor.aj2
-rw-r--r--org.eclipse.virgo.medic/src/main/java/org/eclipse/virgo/medic/log/EntryExitTrace.aj14
3 files changed, 12 insertions, 6 deletions
diff --git a/org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/dump/impl/DumpContributorPublisher.java b/org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/dump/impl/DumpContributorPublisher.java
index 3fbaa26..a3e88a2 100644
--- a/org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/dump/impl/DumpContributorPublisher.java
+++ b/org.eclipse.virgo.medic.core/src/main/java/org/eclipse/virgo/medic/dump/impl/DumpContributorPublisher.java
@@ -42,7 +42,7 @@ public final class DumpContributorPublisher {
}
public void publishDumpContributors() {
- LoggingInterceptor.aspectOf().setLoggingListener(this.logDumpContributor);
+ //LoggingInterceptor.aspectOf().setLoggingListener(this.logDumpContributor);
publishDumpContributor(new SummaryDumpContributor());
publishDumpContributor(new HeapDumpContributor());
diff --git a/org.eclipse.virgo.medic.weaving/src/main/java/org/eclipse/virgo/medic/log/impl/logback/LoggingInterceptor.aj b/org.eclipse.virgo.medic.weaving/src/main/java/org/eclipse/virgo/medic/log/impl/logback/LoggingInterceptor.aj
index 43e080f..691b0a2 100644
--- a/org.eclipse.virgo.medic.weaving/src/main/java/org/eclipse/virgo/medic/log/impl/logback/LoggingInterceptor.aj
+++ b/org.eclipse.virgo.medic.weaving/src/main/java/org/eclipse/virgo/medic/log/impl/logback/LoggingInterceptor.aj
@@ -20,6 +20,7 @@ public aspect LoggingInterceptor {
private volatile LoggingListener loggingListener = new NoOpLoggingListener();
+ /*
pointcut withinLoggingInterception() : cflowbelow(within(LoggingInterceptor) && adviceexecution());
pointcut filteringAndAppendingWithZeroOr3PlusParams(Logger logger, String fqcn, Marker marker, Level level, String message, Object[] params, Throwable throwable)
@@ -58,6 +59,7 @@ public aspect LoggingInterceptor {
this.loggingListener.onLogging(logger, fqcn, marker, level, message, param1, param2, throwable);
}
+ */
public void setLoggingListener(LoggingListener listener) {
if (listener == null) {
listener = new NoOpLoggingListener();
diff --git a/org.eclipse.virgo.medic/src/main/java/org/eclipse/virgo/medic/log/EntryExitTrace.aj b/org.eclipse.virgo.medic/src/main/java/org/eclipse/virgo/medic/log/EntryExitTrace.aj
index 5e4d2c0..7b0b1d8 100644
--- a/org.eclipse.virgo.medic/src/main/java/org/eclipse/virgo/medic/log/EntryExitTrace.aj
+++ b/org.eclipse.virgo.medic/src/main/java/org/eclipse/virgo/medic/log/EntryExitTrace.aj
@@ -27,19 +27,23 @@ public aspect EntryExitTrace pertypewithin(*) {
private volatile Logger logger;
- pointcut performingEntryExitTrace() : cflowbelow(adviceexecution() && within(EntryExitTrace));
-
pointcut medic() : within(org.eclipse.virgo.medic..*);
pointcut util() : within(org.eclipse.virgo.util..*);
+ pointcut repository() : within(org.eclipse.virgo.repository..*);
+
pointcut logback() : within(ch.qos.logback..*) || within(org.slf4j.impl..*);
- pointcut infoCandidate() : execution(public * *(..)) && !medic() && !util() && !logback() && !performingEntryExitTrace();
+ pointcut setter() : execution(* set*(..));
+
+ pointcut getter() : execution(* get*(..));
+
+ pointcut infoCandidate() : execution(public * *(..)) && !setter() && !getter() && !medic() && !util() && !repository() && !logback();
- pointcut debugCandidate() : execution(!public !private * *(..)) && !medic() && !util() && !logback() && !performingEntryExitTrace();
+ pointcut debugCandidate() : execution(!public !private * *(..)) && !setter() && !getter() && !medic() && !util() && !repository() && !logback();
- pointcut traceCandidate() : execution(private * *(..)) && !medic() && !util() && !logback() && !performingEntryExitTrace();
+ pointcut traceCandidate() : execution(private * *(..)) && !setter() && !getter() && !medic() && !util() && !repository() && !logback();
before() : infoCandidate() {
getLogger(thisJoinPointStaticPart).info("{} {}", ">", getSignature(thisJoinPointStaticPart));

Back to the top