/** * The current Redwood configuration; this is used to make incremental changes * to an existing custom configuration. * @return The current Redwood configuration. */ public static RedwoodConfiguration current(){ return new RedwoodConfiguration(); }
/** * An empty Redwood configuration. * Note that without a Console Handler, Redwood will not print anything * @return An empty Redwood Configuration object. */ public static RedwoodConfiguration empty(){ return new RedwoodConfiguration().clear(); }
/** * A standard Redwood configuration, which prints to the console with 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 standard() { return new RedwoodConfiguration().clear().handlers( Handlers.chain(Handlers.hideDebug, Handlers.stderr)); }
/** * 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) ); }
/** Run Redwood with SLF4J if available, otherwise with stderr logging at the error only level. * @return A redwood configuration. Remember to call {@link RedwoodConfiguration#apply()}. */ public static RedwoodConfiguration errorLevel() { RedwoodConfiguration config; try { MetaClass.create("org.slf4j.LoggerFactory").createInstance(); config = new RedwoodConfiguration().clear().handlers( Handlers.chain(Handlers.showOnlyError, Handlers.slf4j)); } catch (Exception ignored) { config = new RedwoodConfiguration().clear().handlers( Handlers.chain(Handlers.showOnlyError, Handlers.stderr)); } return config; }
/** Run Redwood with SLF4J if available, otherwise with stderr logging at the debug (everything) level. * @return A redwood configuration. Remember to call {@link RedwoodConfiguration#apply()}. */ public static RedwoodConfiguration debugLevel() { RedwoodConfiguration config; try { MetaClass.create("org.slf4j.LoggerFactory").createInstance(); config = new RedwoodConfiguration().clear().handlers( Handlers.chain(Handlers.showAllChannels(), Handlers.slf4j)); } catch (Exception ignored) { config = new RedwoodConfiguration().clear().handlers( Handlers.chain(Handlers.showAllChannels(), 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; }
RedwoodConfiguration config = new RedwoodConfiguration().clear(); Set<String> used = Generics.newHashSet();
/** * The current Redwood configuration; this is used to make incremental changes * to an existing custom configuration. * @return The current Redwood configuration. */ public static RedwoodConfiguration current(){ return new RedwoodConfiguration(); }
/** * The current Redwood configuration; this is used to make incremental changes * to an existing custom configuration. * @return The current Redwood configuration. */ public static RedwoodConfiguration current(){ return new RedwoodConfiguration(); }
/** * An empty Redwood configuration. * Note that without a Console Handler, Redwood will not print anything * @return An empty Redwood Configuration object. */ public static RedwoodConfiguration empty(){ return new RedwoodConfiguration().clear(); }
/** * A standard Redwood configuration, which prints to the console with 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 standard() { return new RedwoodConfiguration().clear().handlers( Handlers.chain(Handlers.hideDebug, Handlers.stderr)); }
/** * 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) ); }
/** * 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) ); }
/** * 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 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) ); }