Skip to content

jcustenborder/netty-codec-syslog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maven Central

Introduction

This project provides a Netty based solution for receiving syslog messages. The following formats are currently supported. The mechanism for parsing log messages is plugable. You can add support for additional formats by implementing a MessageParser for the format you wish to support.

Setting up a listener

UDP

     Bootstrap b = new Bootstrap();
     b.group(workerGroup)
         .channel(NioDatagramChannel.class)
         .handler(new ChannelInitializer<DatagramChannel>() {
           @Override
           protected void initChannel(DatagramChannel datagramChannel) throws Exception {
             ChannelPipeline channelPipeline = datagramChannel.pipeline();
             channelPipeline.addLast(
                 new UDPSyslogMessageDecoder(),
                 new SyslogMessageHandler(),
                 handler
             );
           }
         });
 
     return b.bind(InetAddress.getLoopbackAddress(), port());

Building

mvn clean install

Releases

No releases published

Packages

No packages published

Languages