From a6d202105185e5f7179d4d83cdab366054cd0ed5 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Wed, 4 Nov 2015 20:35:45 -0800 Subject: [PATCH] #149 logging to normal --- src/main/java/com/jcabi/aspects/aj/MethodLogger.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/jcabi/aspects/aj/MethodLogger.java b/src/main/java/com/jcabi/aspects/aj/MethodLogger.java index 13238714..b18b2d7f 100644 --- a/src/main/java/com/jcabi/aspects/aj/MethodLogger.java +++ b/src/main/java/com/jcabi/aspects/aj/MethodLogger.java @@ -192,9 +192,9 @@ private Object wrap(final ProceedingJoinPoint point, final Method method, final MethodLogger.Marker marker = new MethodLogger.Marker(point, annotation); this.running.add(marker); + int level = annotation.value(); try { final Object logger = this.logger(method, annotation.name()); - int level = annotation.value(); if (annotation.prepend()) { LogHelper.log( level, @@ -228,7 +228,7 @@ private Object wrap(final ProceedingJoinPoint point, final Method method, && !ex.getClass().isAnnotationPresent(Loggable.Quiet.class)) { final StackTraceElement trace = ex.getStackTrace()[0]; LogHelper.log( - Loggable.ERROR, + level, method.getDeclaringClass(), Logger.format( "%s: thrown %s out of %s#%s[%d] in %[nano]s",