/** Run Redwood with SLF4J if available, otherwise with stderr logging at the warning (and error) level. * @return A redwood configuration. Remember to call {@link RedwoodConfiguration#apply()}. */ public static RedwoodConfiguration infoLevel() { RedwoodConfiguration config; try { MetaClass.create("org.slf4j.LoggerFactory").createInstance(); config = new RedwoodConfiguration().clear().handlers( Handlers.chain(Handlers.hideChannels(Redwood.DBG), Handlers.slf4j)); } catch (Exception ignored) { config = new RedwoodConfiguration().clear().handlers( Handlers.chain(Handlers.hideChannels(Redwood.DBG), Handlers.stderr)); } return config; }
/** Run Redwood with SLF4J if available, otherwise with stderr logging at the warning (and error) level. * @return A redwood configuration. Remember to call {@link RedwoodConfiguration#apply()}. */ public static RedwoodConfiguration infoLevel() { RedwoodConfiguration config; try { MetaClass.create("org.slf4j.LoggerFactory").createInstance(); config = new RedwoodConfiguration().clear().handlers( Handlers.chain(Handlers.hideChannels(Redwood.DBG), Handlers.slf4j)); } catch (Exception ignored) { config = new RedwoodConfiguration().clear().handlers( Handlers.chain(Handlers.hideChannels(Redwood.DBG), Handlers.stderr)); } return config; }
/** * The default Redwood configuration, which prints to the console without channels. * It does not show debug level messages (but shows warning and error messages). * This is the usual starting point for new configurations. * @return A basic Redwood Configuration. */ public static RedwoodConfiguration minimal() { return new RedwoodConfiguration().clear().handlers( Handlers.chain(Handlers.hideChannels(), Handlers.hideDebug, Handlers.stderr) ); }
/** * Run Redwood with SLF4J as the console backend * @return A redwood configuration. Remember to call {@link RedwoodConfiguration#apply()}. */ public static RedwoodConfiguration slf4j() { return new RedwoodConfiguration().clear().handlers( Handlers.chain(Handlers.hideChannels(), Handlers.slf4j) ); }
/** * Run Redwood with java.util.logging * @return A redwood configuration. Remember to call {@link RedwoodConfiguration#apply()}. */ @SuppressWarnings("unused") public static RedwoodConfiguration javaUtilLogging() { return new RedwoodConfiguration().clear().handlers( Handlers.chain(Handlers.hideChannels(), Handlers.javaUtil) ); }
/** * The default Redwood configuration, which prints to the console. * This is the usual starting point for new configurations. * @return A basic Redwood Configuration. */ public static RedwoodConfiguration standard(){ return new RedwoodConfiguration().clear().handlers( Handlers.chain(Handlers.hideChannels(), Handlers.stderr) ); }
/** * Run Redwood with SLF4J as the console backend * @return A redwood configuration. Remember to call {@link RedwoodConfiguration#apply()}. */ public static RedwoodConfiguration slf4j() { return new RedwoodConfiguration().clear().handlers( Handlers.chain(Handlers.hideChannels(), Handlers.slf4j) ); }
/** * The default Redwood configuration, which prints to the console without channels. * It does not show debug level messages (but shows warning and error messages). * This is the usual starting point for new configurations. * @return A basic Redwood Configuration. */ public static RedwoodConfiguration minimal() { return new RedwoodConfiguration().clear().handlers( Handlers.chain(Handlers.hideChannels(), Handlers.hideDebug, Handlers.stderr) ); }
/** * Run Redwood with java.util.logging * @return A redwood configuration. Remember to call {@link RedwoodConfiguration#apply()}. */ @SuppressWarnings("unused") public static RedwoodConfiguration javaUtilLogging() { return new RedwoodConfiguration().clear().handlers( Handlers.chain(Handlers.hideChannels(), Handlers.javaUtil) ); }
/** Run Redwood with SLF4J if available, otherwise with stderr logging at the warning (and error) level. * @return A redwood configuration. Remember to call {@link RedwoodConfiguration#apply()}. */ public static RedwoodConfiguration infoLevel() { RedwoodConfiguration config; try { MetaClass.create("org.slf4j.LoggerFactory").createInstance(); config = new RedwoodConfiguration().clear().handlers( Handlers.chain(Handlers.hideChannels(Redwood.DBG), Handlers.slf4j)); } catch (Exception ignored) { config = new RedwoodConfiguration().clear().handlers( Handlers.chain(Handlers.hideChannels(Redwood.DBG), Handlers.stderr)); } return config; }
/** * Run Redwood with java.util.logging * @return A redwood configuration. Remember to call {@link RedwoodConfiguration#apply()}. */ @SuppressWarnings("unused") public static RedwoodConfiguration javaUtilLogging() { return new RedwoodConfiguration().clear().handlers( Handlers.chain(Handlers.hideChannels(), Handlers.javaUtil) ); }
/** * Run Redwood with SLF4J as the console backend * @return A redwood configuration. Remember to call {@link RedwoodConfiguration#apply()}. */ public static RedwoodConfiguration slf4j() { return new RedwoodConfiguration().clear().handlers( Handlers.chain(Handlers.hideChannels(), Handlers.slf4j) ); }
/** * The default Redwood configuration, which prints to the console without channels. * It does not show debug level messages (but shows warning and error messages). * This is the usual starting point for new configurations. * @return A basic Redwood Configuration. */ public static RedwoodConfiguration minimal() { return new RedwoodConfiguration().clear().handlers( Handlers.chain(Handlers.hideChannels(), Handlers.hideDebug, Handlers.stderr) ); }