private static FormattedLog newFormattedLog( StringWriter writer, Level level ) { return FormattedLog .withUTCTimeZone() .withCategory( "test" ) .withLogLevel( level ) .withTimeSupplier( DATE_TIME_SUPPLIER ) .toPrintWriter( Suppliers.singleton( new PrintWriter( writer ) ) ); }
/** * Start creating a {@link FormattedLog} with the specified log {@link Level} as a default. * Use {@link Builder#toOutputStream} to complete. * * @param level the log level to use as a default * @return a builder for a {@link FormattedLog} */ public static Builder withLogLevel( Level level ) { return new Builder().withLogLevel( level ); }
/** * Start creating a {@link FormattedLog} with the specified log {@link Level} as a default. * Use {@link Builder#toOutputStream} to complete. * * @param level the log level to use as a default * @return a builder for a {@link FormattedLog} */ public static Builder withLogLevel( Level level ) { return new Builder().withLogLevel( level ); }