Skip to content

Commit

Permalink
update kenerator speed by removing unnecessary logging (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
makeevrserg authored Sep 16, 2024
1 parent 79558f4 commit 69ddce1
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package com.flipperdevices.ifrmvp.backend.envkonfig

import org.slf4j.LoggerFactory

internal object KSystem {
private val logger = java.util.logging.Logger.getLogger("KSystem")
private val logger = LoggerFactory.getLogger("KSystem")!!
fun getenvOrNull(key: String): String? {
val value = System.getenv(key) ?: System.getProperty(key)
if (value.isNullOrBlank()) {
logger.warning("Could not found ENV property: $key")
logger.warn("Could not found ENV property: $key")
return null
}
return value
Expand Down
17 changes: 17 additions & 0 deletions modules/kenerator/sql/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>%d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<root level="trace">
<appender-ref ref="STDOUT"/>
</root>
<logger name="org.eclipse.jetty" level="INFO"/>
<logger name="io.netty" level="INFO"/>
<logger name="Exposed" level="OFF"/>
<logger name="KSystem" level="OFF"/>
<root level="debug">
<appender-ref ref="STDOUT"/>
</root>
</configuration>
5 changes: 5 additions & 0 deletions web-api/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,9 @@
</root>
<logger name="org.eclipse.jetty" level="INFO"/>
<logger name="io.netty" level="INFO"/>
<logger name="Exposed" level="OFF"/>
<logger name="KSystem" level="OFF"/>
<root level="debug">
<appender-ref ref="STDOUT"/>
</root>
</configuration>

0 comments on commit 69ddce1

Please sign in to comment.