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 |
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
| <?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.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
| 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
| const sessionTimeoutPollFrequency = 5; | |
| function pollForSessionTimeout() { | |
| let request = new XMLHttpRequest(); | |
| request.onload = function (event) { | |
| var status = event.target.status; | |
| var response = event.target.response; | |
| // if the remaining valid time for the current user session is less than or equals to 0 seconds. | |
| if (status === 200 && (response <= 0)) { |
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
| class SessionTimeoutController < Devise::SessionsController | |
| prepend_before_action :skip_timeout, only: [:check_session_timeout, :render_timeout] | |
| def check_session_timeout | |
| response.headers["Etag"] = "" # clear etags to prevent caching | |
| render plain: ttl_to_timeout, status: :ok | |
| end | |
| def render_timeout | |
| if current_user.present? && user_signed_in? |
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
| devise_scope :user do | |
| get "/check_session_timeout" => "session_timeout#check_session_timeout" | |
| get "/session_timeout" => "session_timeout#render_timeout" | |
| end |
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
| class User < ActiveRecord::Base | |
| devise :timeoutable | |
| end |
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
| Packsize SKU | Variant SKU | Quantity | |
|---|---|---|---|
| DK0475-JJ-P10 | DK0475-JJ | 10 | |
| DK0280P-JJ-P10 | DK0280P-JJ | 10 | |
| DK0280S-JJ-P10 | DK0280S-JJ | 10 | |
| DK0092-JJ-P10 | DK0092-JJ | 10 | |
| DK0094Y-JJ-P10 | DK0094Y-JJ | 10 | |
| DK0090-JJ-P10 | DK0090-JJ | 10 | |
| DK0095-JJ-P10 | DK0095-JJ | 10 | |
| DK0096-JJ-P10 | DK0096-JJ | 10 | |
| DK0097-JJ-P10 | DK0097-JJ | 10 |
NewerOlder