Class FallbackLogger

java.lang.Object
org.frontcache.resilience.FallbackLogger

public class FallbackLogger extends Object
Marker for Logger
  • Field Details

    • logTimeDateFormat

      public static final DateFormat logTimeDateFormat
  • Constructor Details

    • FallbackLogger

      public FallbackLogger()
  • Method Details

    • logger

      public static org.slf4j.Logger logger()
      The logger the fallback resolvers write their TRACE lines to. Renaming this class's package renamed the logger with it, and a logger name is config, not code: an fc-logback.xml carried over from 2.6 still routes the OLD name to logs/fallback.log, so the new lines would fall through to the root logger, be dropped at its level, and leave fallback.log silently empty. That is the worst possible failure mode for a diagnostic log - it looks like "no fallbacks happened". So detect it: the legacy name being TRACE-enabled while the current one is not can only mean a config file that still names the old logger. Both being off is someone turning fallback logging off deliberately, which is not worth a warning.
    • failureType

      public static String failureType(List<FcEventType> events)
      Maps command execution events to the failure category shown on the realtime dashboard (Short-Circuited | Bad Request | Timeout | Rejected | Failure). Used to tag failed requests in the dedicated failed-requests log. The returned strings are deliberately unchanged by the Resilience4j migration: they land in the failed-requests log and in RequestLogger's positional output, which log tooling parses. Only the parameter type moved from List<HystrixEventType> to List<FcEventType>, and FcEventType keeps the same constant names so the mapping is one-for-one.
      Parameters:
      events - the command's execution events (e.g. from getExecutionEvents())
      Returns:
      a lower-case category label, or "error" when none of the known events are present