Package org.apache.logging.log4j.core.net

Examples of org.apache.logging.log4j.core.net.Protocol


        if (name == null) {
            LOGGER.error("No name provided for SyslogAppender");
            return null;
        }
        final String prot = protocol != null ? protocol : Protocol.UDP.name();
        final Protocol p = EnglishEnums.valueOf(Protocol.class, protocol);
        final AbstractSocketManager manager = createSocketManager(p, host, port, reconnectDelay, fail, layout);
        if (manager == null) {
            return null;
        }
View Full Code Here


            LOGGER.error("No name provided for SocketAppender");
            return null;
        }

        final String prot = protocol != null ? protocol : Protocol.TCP.name();
        final Protocol p = EnglishEnums.valueOf(Protocol.class, protocol);
        if (p.equals(Protocol.UDP)) {
            isFlush = true;
        }

        final AbstractSocketManager manager = createSocketManager(p, host, port, reconnectDelay, fail, layout);
        if (manager == null) {
View Full Code Here

        return new SocketAppender(name, layout, filter, manager, handleExceptions, isFlush, isAdvertise ? config.getAdvertiser() : null);
    }

    protected static AbstractSocketManager createSocketManager(final String protocol, final String host, final int port,
                                                               final int delay, final boolean immediateFail) {
        final Protocol p = EnglishEnums.valueOf(Protocol.class, protocol);
        switch (p) {
            case TCP:
                return TCPSocketManager.getSocketManager(host, port, delay, immediateFail);
            case UDP:
                return DatagramSocketManager.getSocketManager(host, port);
View Full Code Here

            @PluginElement("LoggerFields") final LoggerFields[] loggerFields,
            @PluginAttribute(value = "advertise", defaultBoolean = false) final boolean advertise) {
        // @formatter:on

        // TODO: add Protocol to TypeConverters
        final Protocol protocol = EnglishEnums.valueOf(Protocol.class, protocolStr);
        final boolean useTlsMessageFormat = sslConfig != null || protocol == Protocol.SSL;
        final Layout<? extends Serializable> layout = RFC5424.equalsIgnoreCase(format) ?
            Rfc5424Layout.createLayout(facility, id, enterpriseNumber, includeMdc, mdcId, mdcPrefix, eventPrefix, newLine,
                escapeNL, appName, msgId, excludes, includes, required, exceptionPattern, useTlsMessageFormat, loggerFields,
                config) :
View Full Code Here

        if (name == null) {
            LOGGER.error("No name provided for SocketAppender");
            return null;
        }

        final Protocol protocol = EnglishEnums.valueOf(Protocol.class,
                protocolStr != null ? protocolStr : Protocol.TCP.name());
        if (protocol == Protocol.UDP) {
            isFlush = true;
        }
View Full Code Here

        if (name == null) {
            LOGGER.error("No name provided for SyslogAppender");
            return null;
        }
        final Protocol p = EnglishEnums.valueOf(Protocol.class, protocol);
        final AbstractSocketManager manager = createSocketManager(p, host, port, reconnectDelay, fail, layout);
        if (manager == null) {
            return null;
        }
View Full Code Here

        if (name == null) {
            LOGGER.error("No name provided for SocketAppender");
            return null;
        }

        final Protocol p = EnglishEnums.valueOf(Protocol.class, protocol != null ? protocol : Protocol.TCP.name());
        if (p.equals(Protocol.UDP)) {
            isFlush = true;
        }

        final AbstractSocketManager manager = createSocketManager(p, host, port, reconnectDelay, fail, layout);
        if (manager == null) {
View Full Code Here

                isAdvertise ? config.getAdvertiser() : null);
    }

    protected static AbstractSocketManager createSocketManager(final String protocol, final String host, final int port,
                                                               final int delay, final boolean immediateFail) {
        final Protocol p = EnglishEnums.valueOf(Protocol.class, protocol);
        switch (p) {
            case TCP:
                return TCPSocketManager.getSocketManager(host, port, delay, immediateFail);
            case UDP:
                return DatagramSocketManager.getSocketManager(host, port);
View Full Code Here

        }
        return new SocketAppender(name, layout, filter, manager, handleExceptions, isFlush);
    }

    protected static AbstractSocketManager createSocketManager(String protocol, String host, int port, int delay) {
        Protocol p = EnglishEnums.valueOf(Protocol.class, protocol);
        switch (p) {
            case TCP:
                return TCPSocketManager.getSocketManager(host, port, delay);
            case UDP:
                return DatagramSocketManager.getSocketManager(host, port);
View Full Code Here

        return new SocketAppender(name, layout, filter, manager, handleExceptions, isFlush);
    }

    protected static AbstractSocketManager createSocketManager(final String protocol, final String host, final int port,
                                                               final int delay) {
        final Protocol p = EnglishEnums.valueOf(Protocol.class, protocol);
        switch (p) {
            case TCP:
                return TCPSocketManager.getSocketManager(host, port, delay);
            case UDP:
                return DatagramSocketManager.getSocketManager(host, port);
View Full Code Here

TOP

Related Classes of org.apache.logging.log4j.core.net.Protocol

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.