Package me.moocar.logbackgelf

Examples of me.moocar.logbackgelf.GelfAppender


    @Override
    public Appender<ILoggingEvent> build(LoggerContext context, String applicationName, Layout<ILoggingEvent> layout) {
        checkNotNull(context);

        final GelfAppender appender = new GelfAppender();

        appender.setContext(context);
        appender.setFacility(facility.or(applicationName));
        appender.setGraylog2ServerHost(host);
        appender.setGraylog2ServerPort(port);
        appender.setGraylog2ServerVersion(serverVersion);
        appender.setMessagePattern(messagePattern);
        appender.setShortMessagePattern(shortMessagePattern);
        appender.setUseLoggerName(useLoggerName);
        appender.setUseThreadName(useThreadName);
        appender.setChunkThreshold(chunkThreshold);
        appender.setAdditionalFields(additionalFields);
        appender.setStaticAdditionalFields(staticFields);
        appender.setFieldTypes(fieldTypes);
        appender.setIncludeFullMDC(includeFullMDC);
        appender.setUseMarker(useMarker);

        if(hostName.isPresent()) {
            appender.setHostName(hostName.get());
        }

        addThresholdFilter(appender, threshold);
        appender.start();

        return wrapAsync(appender);
    }
View Full Code Here

TOP

Related Classes of me.moocar.logbackgelf.GelfAppender

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.