Top Description Fields Constructors Methods
org.jboss.logging

public final Class JBossLogManagerProvider

extends Object
implements LoggerProvider
Class Inheritance
All Implemented Interfaces
org.jboss.logging.LoggerProvider
Static Imports
org.jboss.logmanager.Logger.AttachmentKey

An implementation of the log provider for the JBoss Log Manager.

Field Summary

Modifier and TypeField and Description
private static final Logger.AttachmentKey<Logger>
private static final Logger.AttachmentKey<ConcurrentMap<String, Logger>>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
clearMdc()

Implements org.jboss.logging.LoggerProvider.clearMdc.

Removes all entries from the message diagnostics context.

public void
clearNdc()

Implements org.jboss.logging.LoggerProvider.clearNdc.

Clears the nested diagnostics context.

private static Logger
doGetLogger(final String name)

private static Logger
public Logger
getLogger(final String
the name of the logger
name
)

Implements org.jboss.logging.LoggerProvider.getLogger.

Returns a logger which is backed by a logger from the log provider.

public Object
getMdc(final String
the key to lookup the value for
key
)

Implements org.jboss.logging.LoggerProvider.getMdc.

Returns the value for the key on the message diagnostics context or null if no value was found.

public Map<String, Object>
getMdcMap()

Implements org.jboss.logging.LoggerProvider.getMdcMap.

Returns the map from the context.

public String
getNdc()

Implements org.jboss.logging.LoggerProvider.getNdc.

Retrieves the current values set for the nested diagnostics context.

public int
getNdcDepth()

Implements org.jboss.logging.LoggerProvider.getNdcDepth.

The current depth of the nested diagnostics context.

public String
peekNdc()

Implements org.jboss.logging.LoggerProvider.peekNdc.

Peeks at the top value from the stack and returns it.

public String
popNdc()

Implements org.jboss.logging.LoggerProvider.popNdc.

Pops top value from the stack and returns it.

public void
pushNdc(final String
the message to push
message
)

Implements org.jboss.logging.LoggerProvider.pushNdc.

Pushes a value to the nested diagnostics context stack.

public Object
putMdc(final String
the key for the value
key
,
final Object
the value
value
)

Implements org.jboss.logging.LoggerProvider.putMdc.

Puts the value onto the message diagnostics context.

public void
removeMdc(final String
the key of the value to remove
key
)

Implements org.jboss.logging.LoggerProvider.removeMdc.

Removes the value from the message diagnostics context.

public void
setNdcMaxDepth(final int
the maximum depth to set
maxDepth
)

Implements org.jboss.logging.LoggerProvider.setNdcMaxDepth.

Sets maximum depth of the stack removing any entries below the maximum depth.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

KEYback to summary
private static final Logger.AttachmentKey<Logger> KEY
LEGACY_KEYback to summary
private static final Logger.AttachmentKey<ConcurrentMap<String, Logger>> LEGACY_KEY

Constructor Detail

JBossLogManagerProviderback to summary
public JBossLogManagerProvider()

Method Detail

clearMdcback to summary
public void clearMdc()

Implements org.jboss.logging.LoggerProvider.clearMdc.

Doc from org.jboss.logging.LoggerProvider.clearMdc.

Removes all entries from the message diagnostics context.

Annotations
@Override
clearNdcback to summary
public void clearNdc()

Implements org.jboss.logging.LoggerProvider.clearNdc.

Doc from org.jboss.logging.LoggerProvider.clearNdc.

Clears the nested diagnostics context.

Annotations
@Override
doGetLoggerback to summary
private static Logger doGetLogger(final String name)
doLegacyGetLoggerback to summary
private static Logger doLegacyGetLogger(final String name)
getLoggerback to summary
public Logger getLogger(final String name)

Implements org.jboss.logging.LoggerProvider.getLogger.

Doc from org.jboss.logging.LoggerProvider.getLogger.

Returns a logger which is backed by a logger from the log provider.

Note

this should never be null

Parameters
name:String

the name of the logger

Returns:Logger

a logger for the log provider logger.

Annotations
@Override
getMdcback to summary
public Object getMdc(final String key)

Implements org.jboss.logging.LoggerProvider.getMdc.

Doc from org.jboss.logging.LoggerProvider.getMdc.

Returns the value for the key on the message diagnostics context or null if no value was found.

Parameters
key:String

the key to lookup the value for

Returns:Object

the value or null if not found

Annotations
@Override
getMdcMapback to summary
public Map<String, Object> getMdcMap()

Implements org.jboss.logging.LoggerProvider.getMdcMap.

Doc from org.jboss.logging.LoggerProvider.getMdcMap.

Returns the map from the context.

Note that in most implementations this is an expensive operation and should be used sparingly.

Returns:Map<String, Object>

the map from the context or an empty map if the context is null

Annotations
@Override
getNdcback to summary
public String getNdc()

Implements org.jboss.logging.LoggerProvider.getNdc.

Doc from org.jboss.logging.LoggerProvider.getNdc.

Retrieves the current values set for the nested diagnostics context.

Returns:String

the current value set or null if no value was set

Annotations
@Override
getNdcDepthback to summary
public int getNdcDepth()

Implements org.jboss.logging.LoggerProvider.getNdcDepth.

Doc from org.jboss.logging.LoggerProvider.getNdcDepth.

The current depth of the nested diagnostics context.

Returns:int

the current depth of the stack

Annotations
@Override
peekNdcback to summary
public String peekNdc()

Implements org.jboss.logging.LoggerProvider.peekNdc.

Doc from org.jboss.logging.LoggerProvider.peekNdc.

Peeks at the top value from the stack and returns it.

Returns:String

the value or an empty string

Annotations
@Override
popNdcback to summary
public String popNdc()

Implements org.jboss.logging.LoggerProvider.popNdc.

Doc from org.jboss.logging.LoggerProvider.popNdc.

Pops top value from the stack and returns it.

Returns:String

the top value from the stack or an empty string if no value was set

Annotations
@Override
pushNdcback to summary
public void pushNdc(final String message)

Implements org.jboss.logging.LoggerProvider.pushNdc.

Doc from org.jboss.logging.LoggerProvider.pushNdc.

Pushes a value to the nested diagnostics context stack.

Parameters
message:String

the message to push

Annotations
@Override
putMdcback to summary
public Object putMdc(final String key, final Object value)

Implements org.jboss.logging.LoggerProvider.putMdc.

Doc from org.jboss.logging.LoggerProvider.putMdc.

Puts the value onto the message diagnostics context.

Parameters
key:String

the key for the value

value:Object

the value

Returns:Object

the previous value set or null if no value was set

Annotations
@Override
removeMdcback to summary
public void removeMdc(final String key)

Implements org.jboss.logging.LoggerProvider.removeMdc.

Doc from org.jboss.logging.LoggerProvider.removeMdc.

Removes the value from the message diagnostics context.

Parameters
key:String

the key of the value to remove

Annotations
@Override
setNdcMaxDepthback to summary
public void setNdcMaxDepth(final int maxDepth)

Implements org.jboss.logging.LoggerProvider.setNdcMaxDepth.

Doc from org.jboss.logging.LoggerProvider.setNdcMaxDepth.

Sets maximum depth of the stack removing any entries below the maximum depth.

Parameters
maxDepth:int

the maximum depth to set

Annotations
@Override