Add the annoation :@loggable to my test project, which caused printing log twice.
test code(static method) as follows:
@Loggable(limit = 200, unit = TimeUnit.MILLISECONDS)
public static void run() throws InterruptedException{
TimeUnit.MILLISECONDS.sleep(300);
// Something that should not take more than 200 msec.
}
2.log result:
13:51:42.489 [main] WARN com.test.aspectj.LoggableObject - #run(): in 299.59ms (too slow!)
13:51:42.489 [main] WARN com.test.aspectj.LoggableObject - #run(): in 299.59ms (too slow!)
Add the annoation :@loggable to my test project, which caused printing log twice.
2.log result: