{"record":{"id":"afbbf87fd688e64f","repo":"apereo/cas","slug":"logger-warn-log-message-summarizer-summarizestackt","errorCode":null,"errorMessage":"logger.warn(LOG_MESSAGE_SUMMARIZER.summarizeStackTrace(message, throwable))","messagePattern":"logger\\.warn\\(LOG_MESSAGE_SUMMARIZER\\.summarizeStackTrace\\(message, throwable\\)\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"info","filePath":"core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/LoggingUtils.java","lineNumber":153,"sourceCode":"     * Log warning.\n     *\n     * @param logger    the logger\n     * @param throwable the throwable\n     */\n    public static void warn(final Logger logger, final Throwable throwable) {\n        warn(logger, getMessage(throwable), throwable);\n    }\n\n    /**\n     * Log warning.\n     *\n     * @param logger    the logger\n     * @param message   the message\n     * @param throwable the throwable\n     */\n    public static void warn(final Logger logger, final String message, final Throwable throwable) {\n        FunctionUtils.doIf(LOG_MESSAGE_SUMMARIZER.shouldSummarize(logger),\n                _ -> logger.warn(LOG_MESSAGE_SUMMARIZER.summarizeStackTrace(message, throwable)),\n                _ -> logger.warn(message, throwable))\n            .accept(throwable);\n    }\n\n    /**\n     * Get first non-null exception message, and return class name if all messages null.\n     *\n     * @param throwable Top level throwable\n     * @return String containing first non-null exception message, or Throwable simple class name\n     */\n    public static String getMessage(final Throwable throwable) {\n        if (StringUtils.isEmpty(throwable.getMessage())) {\n            val message = ExceptionUtils.getThrowableList(throwable)\n                .stream().map(Throwable::getMessage).filter(Objects::nonNull).findFirst();\n            if (message.isPresent()) {\n                return message.get();\n            }\n        }","sourceCodeStart":135,"sourceCodeEnd":171,"githubUrl":"https://github.com/apereo/cas/blob/e7288fc434b4f4505b8452e1a57e8fb3111bb863/core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/LoggingUtils.java#L135-L171","documentation":"This is the summarized branch of LoggingUtils.warn(Logger, String, Throwable): when LOG_MESSAGE_SUMMARIZER.shouldSummarize(logger) is true, the throwable's stack trace is replaced by a condensed summary via summarizeStackTrace(message, throwable) and logged at WARN. Full frames are intentionally omitted to control log volume.","triggerScenarios":"Calling LoggingUtils.warn(logger, message, throwable) with summarization enabled for that logger; the emitted log contains the summarized trace instead of the full one.","commonSituations":"Developers surprised that a WARN log lacks the full stack trace and cannot debug the root cause; environments where summarization was enabled to tame noisy logs.","solutions":["Temporarily disable stack-trace summarization for this logger to see full traces","Check the summarized trace's root frames — they usually name the failing class/method directly","If summarization config is global, scope it per-logger so critical categories keep full traces"],"exampleFix":"// before (summarizer on)\nlogger.warn(LoggingSummarizer.summarizeStackTrace(msg, t));\n// after (full trace when debugging)\nlogging:\n  cas:\n    warnings:\n      stacktrace-summarization: false","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep summarizer configuration documented so debugging sessions aren't confused by missing frames","Use per-logger summarization scope so critical categories retain full traces","When debugging, temporarily disable summarization instead of guessing from the summary"],"tags":["logging","stack-trace","summarization"],"backgroundTag":"stack-trace-summarized","analyzedSha":"e7288fc434b4f4505b8452e1a57e8fb3111bb863","analyzedAt":"2026-09-08T15:39:16.015Z","contentChangedAt":"2026-09-08T15:39:16.015Z","schemaVersion":2},"datasetVersion":"2026-09-15T23:17:13.987Z"}