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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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