Skip to content

Commit

Permalink
Add Slf4j annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
tangllty committed Jul 1, 2024
1 parent e0229f1 commit 7362bb2
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tang-commons/src/main/java/com/tang/commons/annotation/Slf4j.kt
Original file line number Diff line number Diff line change
@@ -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 <reified T> T.LOGGER: Logger
inline get() = LoggerFactory.getLogger(T::class.java)
}
}

0 comments on commit 7362bb2

Please sign in to comment.