Class SimpLogging
- java.lang.Object
- org.springframework.messaging.simp.SimpLogging
public abstract class SimpLogging extends Object
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".
- Since:
- 5.1
- Author:
- Rossen Stoyanchev
- See Also:
LogDelegateFactory
Constructor Summary
Constructors Constructor Description SimpLogging()
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.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.
Constructor Detail
SimpLogging
public SimpLogging()
Method Detail
forLogName
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
- the class for the name of the primary logger- Returns:
- the resulting composite logger
forLog
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
- the primary logger to use- Returns:
- the resulting composite logger