Examples of GelfTransport


Examples of org.graylog2.gelfclient.transport.GelfTransport

        final GelfConfiguration gelfConfiguration = new GelfConfiguration(new InetSocketAddress(hostname, port))
                .transport(GelfTransports.valueOf(protocol));

        LOG.debug("Initializing GELF sender and connecting to {}://{}:{}", protocol, hostname, port);

        final GelfTransport gelfTransport;
        try {
            gelfTransport = GelfTransports.create(gelfConfiguration);
        } catch (Exception e) {
            final String error = "Error initializing " + this.getClass() + ": " + e.getMessage();
            LOG.error(error, e);
View Full Code Here

Examples of org.graylog2.gelfclient.transport.GelfTransport

import static org.testng.Assert.assertNotNull;

@Test
public class GelfOutputTest {
    public void testWrite() throws Exception {
        final GelfTransport transport = mock(GelfTransport.class);
        final Message message = mock(Message.class);
        final GelfMessage gelfMessage = new GelfMessage("Test");

        final GelfOutput gelfOutput = Mockito.spy(new GelfOutput());
        doReturn(transport).when(gelfOutput).buildTransport(any(Configuration.class));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.