/** * 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. * <p>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. * @param primaryLogger primary logger to try first * @param secondaryLogger secondary logger * @param tertiaryLoggers optionally, more fallback loggers * @return the resulting logger to use */ public static Log getCompositeLog(Log primaryLogger, Log secondaryLogger, Log... tertiaryLoggers) { List<Log> loggers = new ArrayList<>(2 + tertiaryLoggers.length); loggers.add(primaryLogger); loggers.add(secondaryLogger); Collections.addAll(loggers, tertiaryLoggers); return new CompositeLog(loggers); }
/** * 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. * <p>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. * @param primaryLogger primary logger to try first * @param secondaryLogger secondary logger * @param tertiaryLoggers optionally, more fallback loggers * @return the resulting logger to use */ public static Log getCompositeLog(Log primaryLogger, Log secondaryLogger, Log... tertiaryLoggers) { List<Log> loggers = new ArrayList<>(2 + tertiaryLoggers.length); loggers.add(primaryLogger); loggers.add(secondaryLogger); Collections.addAll(loggers, tertiaryLoggers); return new CompositeLog(loggers); }
/** * 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. * <p>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. * @param primaryLogger primary logger to try first * @param secondaryLogger secondary logger * @param tertiaryLoggers optionally, more fallback loggers * @return the resulting logger to use */ public static Log getCompositeLog(Log primaryLogger, Log secondaryLogger, Log... tertiaryLoggers) { List<Log> loggers = new ArrayList<>(2 + tertiaryLoggers.length); loggers.add(primaryLogger); loggers.add(secondaryLogger); Collections.addAll(loggers, tertiaryLoggers); return new CompositeLog(loggers); }
/** * 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. * <p>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. * @param primaryLogger primary logger to try first * @param secondaryLogger secondary logger * @param tertiaryLoggers optionally, more fallback loggers * @return the resulting logger to use */ public static Log getCompositeLog(Log primaryLogger, Log secondaryLogger, Log... tertiaryLoggers) { List<Log> loggers = new ArrayList<>(2 + tertiaryLoggers.length); loggers.add(primaryLogger); loggers.add(secondaryLogger); Collections.addAll(loggers, tertiaryLoggers); return new CompositeLog(loggers); }