syslogserver

package module
v0.0.0-...-ac6f39b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2021 License: MIT Imports: 5 Imported by: 0

README

syslog-server

server for golang package log/syslog and sink to file

server

监听 UDP

handler

写文件

parser

基于 rfc3164 调用 github.com/jeromer/syslogparser,主要将时间格式设定为 log/syslog 中的 time.RFC3339

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListenUDP

func ListenUDP(address string, handler Handler) error

Types

type Handler

type Handler interface {
	Handle(data map[string]interface{})
}

type Parser

type Parser struct {
	ParsePriority bool
	// contains filtered or unexported fields
}

func NewParser

func NewParser(buff []byte) *Parser

func (*Parser) Dump

func (p *Parser) Dump() syslogparser.LogParts

func (*Parser) Hostname

func (p *Parser) Hostname(hostname string)

func (*Parser) Location

func (p *Parser) Location(location *time.Location)

func (*Parser) Parse

func (p *Parser) Parse() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL