Skip to content

Commit

Permalink
Remove stack trace from the field trial mismatch message.
Browse files Browse the repository at this point in the history
  • Loading branch information
adorokhine authored and Alexander Dorokhine committed Dec 8, 2014
1 parent 97f96c5 commit 90735df
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions slf4j-api/src/main/java/org/slf4j/LoggerFactory.java
Expand Up @@ -305,13 +305,12 @@ public static Logger getLogger(@Nonnull Class<?> clazz) {
if (AUTO_NAMED_LOGGER_FIELD_TRIAL) {
String autoName = Util.getCallingClassName();
if (!logger.getName().equals(autoName)) {
IllegalStateException exception = new IllegalStateException(String.format(
Util.report(String.format(
"Auto-named logger field trial: mismatch detected between " +
"given logger name and automatic logger name. Given name: \"%s\"; " +
"automatic name: \"%s\". If this is unexpected, please file a bug " +
"against slf4j. Set property %s to \"false\" to disable this check.",
logger.getName(), autoName, AUTO_NAMED_LOGGER_FIELD_TRIAL_PROPERTY));
exception.printStackTrace(System.err);
}
}
return logger;
Expand Down

0 comments on commit 90735df

Please sign in to comment.