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

javax0.jamal.asciidoc.StringColletingLogger Maven / Gradle / Ivy

There is a newer version: 2.8.2
Show newest version
package javax0.jamal.asciidoc;

import javax0.jamal.api.Position;
import javax0.jamal.api.Processor;

public class StringColletingLogger implements Processor.Logger {
    private final StringBuilder sb = new StringBuilder();

    @Override
    public void log(final System.Logger.Level level, final Position pos, final String format, final String... params) {
        sb.append(level.toString()).append(": ").append(String.format(format, (Object[]) params)).append("\n");
    }

    @Override
    public String toString() {
        return sb.toString();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy