All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.asciidoctor.cli.MaxSeverityLogHandler Maven / Gradle / Ivy

There is a newer version: 3.0.0
Show newest version
package org.asciidoctor.cli;

import org.asciidoctor.log.LogHandler;
import org.asciidoctor.log.LogRecord;
import org.asciidoctor.log.Severity;

public class MaxSeverityLogHandler implements LogHandler {

    private Severity maxSeverity = Severity.DEBUG;

    @Override
    public void log(LogRecord logRecord) {
        if (this.maxSeverity.compareTo(logRecord.getSeverity()) < 0) {
            this.maxSeverity = logRecord.getSeverity();
        }
    }

    public Severity getMaxSeverity() {
        return this.maxSeverity;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy