rfc3164

package
v0.0.0-...-ff49b5a Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2020 License: BSD-2-Clause Imports: 3 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.

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

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

func NewParser

func NewParser(buff []byte) *Parser
Example
package main

import (
	"fmt"
	"github.com/MissRain/syslogparser/rfc3164"
)

func main() {
	b := "<34>Oct 11 22:14:15 mymachine su: 'su root' failed for lonvick on /dev/pts/8"
	buff := []byte(b)

	p := rfc3164.NewParser(buff)
	err := p.Parse()
	if err != nil {
		panic(err)
	}

	fmt.Println(p.Dump())
}

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

Jump to

Keyboard shortcuts

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