javax0.jamal.asciidoc.StringColletingLogger Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jamal-asciidoc Show documentation
Show all versions of jamal-asciidoc Show documentation
Asciidoc preprocessor extension
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