This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| let heartBeatActivated = false; | |
| class HeartBeat { | |
| constructor() { | |
| document.addEventListener('DOMContentLoaded', () => { | |
| this.initHeartBeat(); | |
| }); | |
| } | |
| initHeartBeat() { | |
| this.lastActive = new Date().valueOf(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example.appender | |
| import org.apache.logging.log4j.core.Filter | |
| import org.apache.logging.log4j.core.Layout | |
| import org.apache.logging.log4j.core.LogEvent | |
| import org.apache.logging.log4j.core.appender.AbstractAppender | |
| import org.apache.logging.log4j.core.config.Property | |
| import org.apache.logging.log4j.core.config.plugins.Plugin | |
| import org.apache.logging.log4j.core.config.plugins.PluginAttribute | |
| import org.apache.logging.log4j.core.config.plugins.PluginElement |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="UTF-8"?> | |
| <Configuration status="WARN"> | |
| <Properties> | |
| <Property name="LOG_PATTERN"> | |
| %d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n | |
| </Property> | |
| </Properties> | |
| <Appenders> | |
| <Console name="Console" target="SYSTEM_OUT"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example | |
| import mu.KotlinLogging | |
| class Foo { | |
| private val logger = KotlinLogging.logger {} | |
| fun bar() { | |
| logger.error("this is a test log message") | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.example | |
| import com.example.appender.TestAppender | |
| import org.apache.logging.log4j.LogManager | |
| import org.apache.logging.log4j.core.LoggerContext | |
| import org.apache.logging.log4j.core.config.Configuration | |
| import org.junit.jupiter.api.AfterEach | |
| import org.junit.jupiter.api.BeforeEach | |
| import org.junit.jupiter.api.Test | |
| import kotlin.test.assertEquals |
OlderNewer