public class LevelRemappingAppender
extends ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>
Appender
that can remap ILoggingEvent
Level
s as they are
written.setRemapLevels(String)
,
setDestinationLogger(String)
Modifier and Type | Class and Description |
---|---|
protected static class |
LevelRemappingAppender.AppendableLogger
Simple wrapper around a logger that can have events appended.
|
Constructor and Description |
---|
LevelRemappingAppender()
Create a new
LevelRemappingAppender . |
LevelRemappingAppender(String destinationLogger)
Create a new
LevelRemappingAppender with a specific destination logger. |
Modifier and Type | Method and Description |
---|---|
protected void |
append(ch.qos.logback.classic.spi.ILoggingEvent event) |
protected LevelRemappingAppender.AppendableLogger |
getLogger(String name) |
void |
setDestinationLogger(String destinationLogger)
Sets the destination logger that will be used to send remapped events.
|
void |
setRemapLevels(String remapLevels)
Set the remapped level.
|
addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, start, stop, toString
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
public LevelRemappingAppender()
LevelRemappingAppender
.public LevelRemappingAppender(String destinationLogger)
LevelRemappingAppender
with a specific destination logger.destinationLogger
- the destination loggerprotected void append(ch.qos.logback.classic.spi.ILoggingEvent event)
append
in class ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>
protected LevelRemappingAppender.AppendableLogger getLogger(String name)
public void setDestinationLogger(String destinationLogger)
destinationLogger
- the destinationLogger namepublic void setRemapLevels(String remapLevels)
remapLevels
- comma separated String of remapped levels in the form
"FROM->TO". For example, "DEBUG->TRACE,ERROR->WARN".Copyright © 2019 Pivotal Software, Inc.. All rights reserved.