apereo/cas · warning
logger.warn(message, throwable)
Error message
logger.warn(message, throwable)
What it means
The full-trace branch of LoggingUtils.warn(Logger, String, Throwable) as at line 151 (same method, adjacent call-site entry): logger.warn(message, throwable) emits the complete stack trace at WARN when the summarizer decides not to summarize. Not an exception; it is the recorded warn event.
Solutions
- Address the recoverable condition reported in the message/trace
- Enable stack-trace summarization if full traces are bloating logs
- Route or deduplicate this category in log aggregation if it recurs
Defensive patterns
Strategy: validation
Prevention
- Same as the full-trace warn path: resolve the underlying recoverable exception
- Enable trace summarization in production if logs grow too large
- Set alerting on repeated identical warn events to spot chronic issues
When it happens
Trigger: Same as errorIndex 415: warn(logger, message, throwable) invoked with summarization disabled for that logger.
Common situations: Same as errorIndex 415; log-parsing pipelines may see this and the line-151 entry as duplicates of one warn event.
Related errors
- logger.warn(message, throwable) (or summarized stack trace)
- warn(logger, getMessage(throwable), throwable)
- logger.warn(LOG_MESSAGE_SUMMARIZER.summarizeStackTrace(messa…
- warn(logger, getMessage(throwable), throwable)
- out.warn(ASCII_ART_LOGGER_MARKER, message)
AI-assisted analysis of apereo/cas@e7288fc434 (2026-09-08).
Data as JSON: /api/errors/e838af1065797e38.
Report an issue: GitHub.
Appendix: source
Thrown at core/cas-server-core-util-api/src/main/java/org/apereo/cas/util/LoggingUtils.java:154
*
* @param logger the logger
* @param throwable the throwable
*/
public static void warn(final Logger logger, final Throwable throwable) {
warn(logger, getMessage(throwable), throwable);
}
/**
* Log warning.
*
* @param logger the logger
* @param message the message
* @param throwable the throwable
*/
public static void warn(final Logger logger, final String message, final Throwable throwable) {
FunctionUtils.doIf(LOG_MESSAGE_SUMMARIZER.shouldSummarize(logger),
_ -> logger.warn(LOG_MESSAGE_SUMMARIZER.summarizeStackTrace(message, throwable)),
_ -> logger.warn(message, throwable))
.accept(throwable);
}
/**
* Get first non-null exception message, and return class name if all messages null.
*
* @param throwable Top level throwable
* @return String containing first non-null exception message, or Throwable simple class name
*/
public static String getMessage(final Throwable throwable) {
if (StringUtils.isEmpty(throwable.getMessage())) {
val message = ExceptionUtils.getThrowableList(throwable)
.stream().map(Throwable::getMessage).filter(Objects::nonNull).findFirst();
if (message.isPresent()) {
return message.get();
}
}
return StringUtils.defaultIfEmpty(throwable.getMessage(), throwable.getClass().getSimpleName());View on GitHub (pinned to e7288fc434)