@Bean
@ConditionalOnMissingBean(LoggerFormats.class)
public LoggerFormats loggerFormats() {
return LoggerFormats.builder()
.enter("#${method.name}(${method.args}): "
+ "entered")
.warnBefore("#${method.name}(${method.args}): "
+ "in ${method.duration} and still running (max ${method.warn.duration})")
.warnAfter("#${method.name}(${method.args}): "
+ "${method.result} in ${method.duration} (max ${method.warn.duration})")
.after("#${method.name}(${method.args}): "
+ "${method.result} in ${method.duration}")
.error("#${method.name}(${method.args}): "
+ "thrown ${error.class.name}(${error.message}) "
+ "from ${error.source.class.name}[${error.source.line}] in ${method.duration}")
.build();
}
LoggerConfiguration.java 文件源码
java
阅读 23
收藏 0
点赞 0
评论 0
项目:logger-spring-boot
作者:
评论列表
文章目录