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

io.dropwizard.logging.layout.DiscoverableLayoutFactory Maven / Gradle / Ivy

There is a newer version: 5.0.0-alpha.5
Show newest version
package io.dropwizard.logging.layout;

import ch.qos.logback.classic.LoggerContext;
import ch.qos.logback.core.LayoutBase;
import ch.qos.logback.core.spi.DeferredProcessingAware;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import io.dropwizard.jackson.Discoverable;

import java.util.TimeZone;

/**
 * An interface for building Logback {@link LayoutBase} layouts, which could be discovered by Jackson
 * and specified in the logging configuration.
 *
 * @param  The type of log event
 */
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
public interface DiscoverableLayoutFactory extends Discoverable {

    /**
     * Creates a {@link LayoutBase} of type E
     *
     * @param context  the Logback context
     * @param timeZone the TimeZone
     * @return a new {@link LayoutBase}
     */
    LayoutBase build(LoggerContext context, TimeZone timeZone);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy