org.apache.tools.ant.types.LogLevel Java Examples

The following examples show how to use org.apache.tools.ant.types.LogLevel. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TestGroupsGeneratorTask.java    From proctor with Apache License 2.0 6 votes vote down vote up
/**
 * Validate input specification and log messages
 */
private void validateSpecification(final ProctorSpecification specification) {
    final boolean hasDuplicatedFilters = specification.getDynamicFilters()
            .asCollection()
            .stream()
            .anyMatch(filter -> filter.getClass().isAnnotationPresent(Deprecated.class));

    if (hasDuplicatedFilters) {
        log(String.join("\n",
                "=================================================================================",
                "Warning: Proctor detected this application is using deprecated dynamic filters.",
                "Please migrate to meta tags based filters.",
                "See " + DYNAMIC_FILTERS_MIGRATION_URL + " for details.",
                "",
                "Sleeping " + SLEEP_TIME_FOR_WARNING + " seconds",
                "================================================================================="
                ), LogLevel.WARN.getLevel()
        );
    }
}
 
Example #2
Source File: AntLogHandle.java    From Baffle with MIT License 4 votes vote down vote up
@Override
public void publish( LogRecord record ) {
    task.log(record.getMessage(), LogLevel.INFO.getLevel());

}