类 LogDelegateFactory
java.lang.Object
cn.taketoday.logging.LogDelegateFactory
Factory for common
Logger delegates with logging conventions.
Mainly for internal use within the framework
- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev, Juergen Hoeller
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static LoggergetCompositeLog(Logger primaryLogger, Logger secondaryLogger, Logger... tertiaryLoggers) Create a composite logger that delegates to a primary or falls back on a secondary logger if logging for the primary logger is not enabled.static LoggergetHiddenLog(Class<?> clazz) Create a "hidden" logger with a category name prefixed with "_", thus precluding it from being enabled together with other log categories from the same package.static LoggergetHiddenLog(String category) Create a "hidden" logger with a category name prefixed with "_", thus precluding it from being enabled together with other log categories from the same package.
-
构造器详细资料
-
LogDelegateFactory
private LogDelegateFactory()
-
-
方法详细资料
-
getCompositeLog
public static Logger getCompositeLog(Logger primaryLogger, Logger secondaryLogger, Logger... tertiaryLoggers) Create a composite logger that delegates to a primary or falls back on a secondary logger if logging for the primary logger is not enabled.This may be used for fallback logging from lower-level packages that logically should log together with some higher-level package but the two don't happen to share a suitable parent package (e.g. logging for the web and lower-level http and codec packages). For such cases the primary (class-based) logger can be wrapped with a shared fallback logger.
- 参数:
primaryLogger- primary logger to try firstsecondaryLogger- secondary loggertertiaryLoggers- optional vararg of further fallback loggers- 返回:
- the resulting composite logger for the related categories
-
getHiddenLog
Create a "hidden" logger with a category name prefixed with "_", thus precluding it from being enabled together with other log categories from the same package. This is useful for specialized output that is either too verbose or otherwise optional or unnecessary to see all the time.- 参数:
clazz- the class for which to create a logger- 返回:
- a Logger with the category
"_" + fully-qualified class name
-
getHiddenLog
Create a "hidden" logger with a category name prefixed with "_", thus precluding it from being enabled together with other log categories from the same package. This is useful for specialized output that is either too verbose or otherwise optional or unnecessary to see all the time.- 参数:
category- the log category to use- 返回:
- a Logger with the category
"_" + category
-