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

pl.tkowalcz.tjahzi.log4j2.labels.Literal Maven / Gradle / Ivy

There is a newer version: 0.9.32
Show newest version
package pl.tkowalcz.tjahzi.log4j2.labels;

import org.apache.logging.log4j.core.LogEvent;

import java.util.function.Consumer;

public class Literal implements LabelPrinter {

    private final String contents;

    public Literal(String contents) {
        this.contents = contents;
    }

    @Override
    public boolean isStatic() {
        return true;
    }

    public static Literal of(String string) {
        return new Literal(string);
    }

    @Override
    public void append(LogEvent event, Consumer appendable) {
        appendable.accept(contents);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy