public final class GelfBootstrap extends Object
GelfLogbackAppender to the root logger.| Modifier and Type | Method and Description |
|---|---|
static void |
bootstrap(String name,
String host,
int port,
boolean cleanRootLogger)
Bootstrap the SLF4J root logger with a configured
GelfLogbackAppender. |
static void |
bootstrap(String name,
String host,
int port,
com.google.common.base.Optional<String> hostName,
boolean cleanRootLogger)
Bootstrap the SLF4J root logger with a configured
GelfLogbackAppender. |
public static void bootstrap(String name, String host, int port, boolean cleanRootLogger)
GelfLogbackAppender.name - The facility to use in the GELF messageshost - The host of the Graylog2 serverport - The port of the Graylog2 servercleanRootLogger - If true, detach and stop all other appenders from the root loggerpublic static void bootstrap(String name, String host, int port, com.google.common.base.Optional<String> hostName, boolean cleanRootLogger)
GelfLogbackAppender.name - The facility to use in the GELF messageshost - The host of the Graylog2 serverport - The port of the Graylog2 serverhostName - The (local) hostname used in GELF messages. Defaults to the local hostname.cleanRootLogger - If true, detach and stop all other appenders from the root loggerCopyright © 2016. All rights reserved.