func (s *Server) SetHandler(handler Handler) {
	s.handler = handler
}
Sets the handler, this handler with receive every syslog entry
package syslog
import (
	"bufio"
	"crypto/tls"
	"errors"
	"net"
	"strings"
	"sync"
	"time"
	"gopkg.in/mcuadros/go-syslog.v2/format"
)
var (
	RFC3164   = &format.RFC3164{}    
	RFC5424   = &format.RFC5424{}    
	RFC6587   = &format.RFC6587{}    
	Automatic = &format.Automatic{}  
)
const (
	datagramChannelBufferSize = 10
	datagramReadBufferSize    = 64 * 1024
)
type TlsPeerNameFunc func(tlsConn *tls.Conn) (tlsPeer string, ok bool)
type Server struct {
	listeners               []net.Listener
	connections             []net.PacketConn
	wait                    sync.WaitGroup
	doneTcp                 chan bool
	datagramChannel         chan DatagramMessage
	format                  format.Format
	handler                 Handler
	lastError               error
	readTimeoutMilliseconds int64
	tlsPeerNameFunc         TlsPeerNameFunc
	datagramPool            sync.Pool
}
func NewServer() *Server {
	return &Server{tlsPeerNameFunc: defaultTlsPeerName, datagramPool: sync.Pool{
		New: func() interface{} {
			return make([]byte, 65536)
		},
	}}
}
func (s *Server) SetFormat(f format.Format) {
	s.format = f
}