lines, err := apachelogparser.Parse("logs/access_log")
if err != nil {
log.Fatal(err)
}
for _, line := range lines {
fmt.Printf("remote host: %s\n", line.RemoteHost)
fmt.Printf("time: %s\n", line.Time)
fmt.Printf("request: %s\n", line.Request)
fmt.Printf("status: %d\n", line.Status)
fmt.Printf("bytes: %d\n", line.Bytes)
fmt.Printf("referer: %s\n", line.Referer)
fmt.Printf("user agent: %s\n", line.UserAgent)
fmt.Printf("url: %s\n", line.Url)
}
-
Notifications
You must be signed in to change notification settings - Fork 6
Go library for parsing standard Apache log files.
License
dsparling/go-apache-log-parser
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Go library for parsing standard Apache log files.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published