SoulLoggerAppender

class SoulLoggerAppender : AppenderBase<ILoggingEvent> (source)

Custom Logback Appender that integrates with SoulLogger's Channel-based architecture.

Features:

  • Maintains existing Channel queue for backpressure handling

  • Supports both text and JSON output formats

  • Handles file rotation based on size

  • Async processing via coroutines

Author

LesterE

Since

1.0.0

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
data class SoulLogEntry(val timestamp: Long, val level: String, val loggerName: String, val message: String, val threadName: String, val mdc: Map<String, String>?, val throwable: String?)

Internal log entry representation.

Properties

Link copied to clipboard
open override var context: Context?
Link copied to clipboard
open override val copyOfAttachedFiltersList: List<Filter<ILoggingEvent?>?>?
Link copied to clipboard
protected open val declaredOrigin: Any?
Link copied to clipboard
open override val isStarted: Boolean
Link copied to clipboard
open override var name: String?
Link copied to clipboard
protected var started: Boolean
Link copied to clipboard
open val statusManager: StatusManager?

Functions

Link copied to clipboard
open fun addError(msg: String?)
open fun addError(msg: String?, ex: Throwable?)
Link copied to clipboard
open fun addFilter(newFilter: Filter<ILoggingEvent?>?)
Link copied to clipboard
open fun addInfo(msg: String?)
open fun addInfo(msg: String?, ex: Throwable?)
Link copied to clipboard
open fun addStatus(status: Status?)
Link copied to clipboard
open fun addWarn(msg: String?)
open fun addWarn(msg: String?, ex: Throwable?)
Link copied to clipboard
protected open override fun append(event: ILoggingEvent)
Link copied to clipboard
open fun clearAllFilters()
Link copied to clipboard
open fun doAppend(eventObject: ILoggingEvent?)
Link copied to clipboard
open fun getContext(): Context?
Link copied to clipboard
open fun getCopyOfAttachedFiltersList(): List<Filter<ILoggingEvent?>?>?
Link copied to clipboard
open fun getFilterChainDecision(event: ILoggingEvent?): FilterReply?
Link copied to clipboard
fun initialize(configuration: SoulLoggerPluginConfiguration, channel: Channel<SoulLoggerAppender.SoulLogEntry>, scope: CoroutineScope)

Initialize the appender with SoulLogger configuration.

Link copied to clipboard
open fun setContext(context: Context?)
Link copied to clipboard
open override fun start()
Link copied to clipboard
open override fun stop()