Skip to content

Commit 21c565a

Browse files
aSemyhsz
authored andcommitted
use static logger instance
1 parent bf85289 commit 21c565a

File tree

1 file changed

+2
-1
lines changed
  • src/main/kotlin/org/jetbrains/intellij

1 file changed

+2
-1
lines changed

src/main/kotlin/org/jetbrains/intellij/utils.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,10 @@ fun warn(logCategory: String? = null, message: String, e: Throwable? = null) = l
207207
fun info(logCategory: String? = null, message: String, e: Throwable? = null) = log(LogLevel.INFO, logCategory, message, e)
208208
fun debug(logCategory: String? = null, message: String, e: Throwable? = null) = log(LogLevel.DEBUG, logCategory, message, e)
209209

210+
private val logger = Logging.getLogger(IntelliJPlugin::class.java)
211+
210212
private fun log(level: LogLevel, logCategory: String?, message: String, e: Throwable?) {
211213
val category = "gradle-intellij-plugin ${logCategory.orEmpty()}".trim()
212-
val logger = Logging.getLogger(IntelliJPlugin::class.java)
213214
if (e != null && level != LogLevel.ERROR && !logger.isDebugEnabled) {
214215
logger.log(level, "[$category] $message. Run with --debug option to get more log output.")
215216
} else {

0 commit comments

Comments
 (0)