All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.fissore.slf4j.package-info Maven / Gradle / Ivy

There is a newer version: 0.14.0
Show newest version
/**
 * slf4j-fluent provides a fluent API for SLF4J
 *
 * 

Example code:

*
 * import static org.fissore.slf4j.Util.lazy;
 *
 * ...
 *
 * FluentLogger log = FluentLoggerFactory.getLogger(getClass());
 *
 * log.debug().log("A debug log entry with {} args: {}, {}", 2, "value 1", lazy(() -> someObject.expensiveMethod()));
 *
 * // will add the stacktrace of the cause to the log entry
 * log.error().withCause(exception).log("An error occured while fetching user {}", user.getId());
 *
 * // will log every 5 calls to `log` method, instead of every single time
 * log.error().every(5).log("Errors occured, but we print only one entry every 5");
 *
 * // will log every 1 second, instead of every single time
 * log.error().every(1, ChronoUnit.SECONDS).log("Errors occured, but we print only one entry every 1 second");
 * 
*/ package org.fissore.slf4j;




© 2015 - 2025 Weber Informatics LLC | Privacy Policy