/** * Create a default logging fraction for the specified level. * * @return The fully-configured fraction. */ public static LoggingFraction createDefaultLoggingFraction(Level level) { return new LoggingFraction().applyDefaults(level); }
public LoggingFraction applyDefaults() { Level level = Level.INFO; String prop = System.getProperty(LoggingProperties.LOGGING); if (prop != null) { prop = prop.trim().toUpperCase(); try { level = Level.valueOf(prop); } catch (IllegalArgumentException e) { // Go with default of Level.INFO } } return applyDefaults(level); }