modulepackage
0.0.0-20200807130032-942de437739a
Repository: https://github.com/chrishoffman/haproxylog.git
Documentation: pkg.go.dev
# README
haproxylog

haproxylog is a go library that parses haproxy log messages.
Installation
Standard go get
:
$ go get github.com/chrishoffman/haproxylog
Usage
package main
import (
"fmt"
"github.com/chrishoffman/haproxylog"
)
func main() {
rawLog := `192.168.9.185:56276 [29/May/2015:10:36:47.766] Service1 Service1/host-1 2/0/0 423 -- 282/36/0/0/0 0/0`
log, err := haproxy.NewLog(rawLog)
if err != nil {
panic(err)
}
fmt.Println("Frontend Name: ", log.FrontendName)
fmt.Println("Backend Name: ", log.BackendName)
fmt.Println("Stat Tt: ", log.Tt)
}
See GoDoc for complete documentation.
# Functions
NewLog identifies the type and parses a raw HAProxy log line and returns a Log struct.
# Structs
No description provided by the author
Log contains all the available fields from the HAProxy logs.
# Type aliases
LogFormat is an enumeration containing the available formats for HAProxy log messages.