Skip to content

Commit

Permalink
#781 | Adjusted log4j2 live template
Browse files Browse the repository at this point in the history
  • Loading branch information
mlytvyn authored Nov 1, 2023
1 parent df7ac4a commit 560174c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

### `Kotlin` enhancements
- Introduced `ysri` live template for Spring `@Resource` declaration [#780](https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/780)
- Adjusted `log4j2` live template [#781](https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/781)

## [2023.2.10]

Expand Down
9 changes: 4 additions & 5 deletions resources/liveTemplates/Kotlin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,18 @@

<templateSet group="Kotlin">
<template name="log4j2"
value="private static final org.apache.logging.log4j.Logger LOG = org.apache.logging.log4j.LogManager.getLogger($CLASS$.class);"
value="private val LOG by lazy { org.apache.logging.log4j.LogManager.getLogger(this::class.java.name) }"
description="Define Log4j 2 Logger" toReformat="true" toShortenFQNames="true">
<variable name="CLASS" expression="className()" alwaysStopAt="true"/>
<context>
<option name="KOTLIN_CLASS" value="true"/>
<option name="KOTLIN_OBJECT_DECLARATION" value="true"/>
</context>
</template>
<template name="slf4j"
value="private static final org.slf4j.Logger LOG = org.slf4j.LoggerFactory.getLogger($CLASS$.class);"
value="private val LOG = org.slf4j.LoggerFactory.getLogger($CLASS$.class);"
description="Define Simple Logging Facade (SLF4J) Logger" toReformat="true" toShortenFQNames="true">
<variable name="CLASS" expression="className()" alwaysStopAt="true"/>
<context>
<option name="KOTLIN_CLASS" value="true"/>
<option name="KOTLIN_OBJECT_DECLARATION" value="true"/>
</context>
</template>
<template name="ysri"
Expand Down

0 comments on commit 560174c

Please sign in to comment.