From 7362bb2976a94fa72180d386b8e49766d019e53e Mon Sep 17 00:00:00 2001 From: Tang Date: Mon, 1 Jul 2024 09:03:17 +0800 Subject: [PATCH] Add `Slf4j` annotation --- .../java/com/tang/commons/annotation/Slf4j.kt | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 tang-commons/src/main/java/com/tang/commons/annotation/Slf4j.kt diff --git a/tang-commons/src/main/java/com/tang/commons/annotation/Slf4j.kt b/tang-commons/src/main/java/com/tang/commons/annotation/Slf4j.kt new file mode 100644 index 00000000..ed1889ef --- /dev/null +++ b/tang-commons/src/main/java/com/tang/commons/annotation/Slf4j.kt @@ -0,0 +1,18 @@ +package com.tang.commons.annotation + +import org.slf4j.Logger +import org.slf4j.LoggerFactory + +/** + * Slf4j 注解 + * + * @author Tang + */ +@Target(AnnotationTarget.CLASS) +@Retention(AnnotationRetention.RUNTIME) +annotation class Slf4j { + companion object { + val T.LOGGER: Logger + inline get() = LoggerFactory.getLogger(T::class.java) + } +}