![JAR search and dependency download from the Maven repository](/logo.png)
internal.sdmxdl.web.spi.FailsafeLogging Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdmx-dl-api Show documentation
Show all versions of sdmx-dl-api Show documentation
Easily download official statistics - API
The newest version!
package internal.sdmxdl.web.spi;
import java.util.logging.Level;
import java.util.logging.Logger;
@lombok.AllArgsConstructor
public final class FailsafeLogging {
public static FailsafeLogging of(Class> type) {
return new FailsafeLogging(Logger.getLogger(type.getName()), Level.WARNING);
}
private final Logger log;
private final Level level;
public void logUnexpectedError(String msg, RuntimeException ex) {
if (log.isLoggable(level)) {
log.log(level, msg, ex);
}
}
public void logUnexpectedNull(String msg) {
if (log.isLoggable(level)) {
log.log(level, msg);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy