Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade logback #1043

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import ch.qos.logback.classic.spi.{ILoggingEvent, IThrowableProxy, LoggerContext
import org.slf4j.Marker
import tofu.logging.LoggedValue
import tofu.logging.impl.ContextMarker
import org.slf4j.event.KeyValuePair

class ConsoleContextLayout extends PatternLayout {

Expand All @@ -15,7 +16,6 @@ class ConsoleContextLayout extends PatternLayout {
}

class WrappedEvent(event: ILoggingEvent) extends ILoggingEvent {

lazy val getMDCPropertyMap: util.Map[String, String] = {
val map = new util.HashMap[String, String]
map.putAll(event.getMDCPropertyMap)
Expand Down Expand Up @@ -48,8 +48,16 @@ class WrappedEvent(event: ILoggingEvent) extends ILoggingEvent {
def getThrowableProxy: IThrowableProxy = event.getThrowableProxy
def getCallerData: Array[StackTraceElement] = event.getCallerData
def hasCallerData: Boolean = event.hasCallerData
def getMarker: Marker = event.getMarker
def getMdc: util.Map[String, String] = getMDCPropertyMap
def getTimeStamp: Long = event.getTimeStamp
def prepareForDeferredProcessing(): Unit = event.prepareForDeferredProcessing()

def getMdc: util.Map[String, String] = getMDCPropertyMap
def getTimeStamp: Long = event.getTimeStamp
def prepareForDeferredProcessing(): Unit = event.prepareForDeferredProcessing()

def getMarkerList(): util.List[Marker] = event.getMarkerList

def getNanoseconds(): Int = event.getNanoseconds

def getSequenceNumber(): Long = event.getSequenceNumber

def getKeyValuePairs(): util.List[KeyValuePair] = event.getKeyValuePairs()
}
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ object Dependencies {

val fs2CE3 = "3.6.1"

val logback = "1.2.12"
val logback = "1.4.7"

val monix = "3.4.1"

Expand Down
2 changes: 1 addition & 1 deletion website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ module.exports = {
position: "right"
},
{
href: "pathname:///api/index.html",
href: "pathname:///api/",
label: "API",
position: "right"
}
Expand Down