Top Description Fields Constructors Methods
org.springframework.messaging.simp

public abstract Class SimpLogging

extends Object
Class Inheritance
Imports
org.apache.commons.logging.Log, .LogFactory, org.springframework.core.log.LogDelegateFactory

Holds the shared logger named "org.springframework.web.SimpLogging" to use for STOMP over WebSocket messaging when logging for "org.springframework.messaging.simp" is off but logging for "org.springframework.web" is on.

This makes it possible to enable all web related logging via "org.springframework.web" including logging from lower-level packages such as "org.springframework.messaging.simp".

To see logging from the primary classes where log messages originate from, simply enable logging for "org.springframework.messaging".

Author
Rossen Stoyanchev
Since
5.1
See Also
LogDelegateFactory

Field Summary

Modifier and TypeField and Description
private static final Log

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static Log

Returns:

the resulting composite logger
forLog
(Log
the primary logger to use
primaryLogger
)

Wrap the given primary logger with a composite logger that delegates to either the primary or to the shared fallback logger "org.springframework.web.HttpLogging", if the primary is not enabled.

public static Log

Returns:

the resulting composite logger
forLogName
(Class<?>
the class for the name of the primary logger
primaryLoggerClass
)

Create a primary logger for the given class and wrap it with a composite that delegates to it or to the fallback logger named "org.springframework.web.SimpLogging", if the primary is not enabled.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fallbackLoggerback to summary
private static final Log fallbackLogger

Constructor Detail

SimpLoggingback to summary
public SimpLogging()

Method Detail

forLogback to summary
public static Log forLog(Log primaryLogger)

Wrap the given primary logger with a composite logger that delegates to either the primary or to the shared fallback logger "org.springframework.web.HttpLogging", if the primary is not enabled.

Parameters
primaryLogger:Log

the primary logger to use

Returns:Log

the resulting composite logger

forLogNameback to summary
public static Log forLogName(Class<?> primaryLoggerClass)

Create a primary logger for the given class and wrap it with a composite that delegates to it or to the fallback logger named "org.springframework.web.SimpLogging", if the primary is not enabled.

Parameters
primaryLoggerClass:Class<?>

the class for the name of the primary logger

Returns:Log

the resulting composite logger