Package org.fluentd.logger.sender

Examples of org.fluentd.logger.sender.RawSocketSender.emit()


        // start senders
        RawSocketSender sender = new RawSocketSender("localhost", port);
        Map<String, Object> data = new HashMap<String, Object>();
        data.put("t1k1", "t1v1");
        data.put("t1k2", "t1v2");
        sender.emit("tag.label1", timestamp, data);

        packer.write(new Event("tag.label1", timestamp, data));
        byte[] bytes1 = packer.toByteArray();
        assertArrayEquals(bytes1, sender.getBuffer());
View Full Code Here


        assertArrayEquals(bytes1, sender.getBuffer());

        Map<String, Object> data2 = new HashMap<String, Object>();
        data2.put("t2k1", "t2v1");
        data2.put("t2k2", "t2v2");
        sender.emit("tag.label2", timestamp, data2);

        packer.write(new Event("tag.label2", timestamp, data2));
        byte[] bytes2 = packer.toByteArray();
        assertArrayEquals(bytes2, sender.getBuffer());
View Full Code Here

        Map<String, Object> data = new HashMap<String, Object>();
        data.put("t1k1", "t1v1");
        data.put("t1k2", "t1v2");
        for (int i = 0; i < 3; ++i) {
        System.out.println("sender emit");
        sender.emit("tag.label1", data);
        }

        packer.write(new Event("tag.label1", timestamp, data));
        byte[] bytes1 = packer.toByteArray();
        assertArrayEquals(bytes1, sender.getBuffer());
View Full Code Here

        assertArrayEquals(bytes1, sender.getBuffer());

        Map<String, Object> data2 = new HashMap<String, Object>();
        data2.put("t2k1", "t2v1");
        data2.put("t2k2", "t2v2");
        sender.emit("tag.label2", data2);

        packer.write(new Event("tag.label2", timestamp, data2));
        byte[] bytes2 = packer.toByteArray();
        assertArrayEquals(bytes2, sender.getBuffer());
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.