logger

package
v0.0.0-...-38a9cd2 Latest Latest
Warning

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

Go to latest
Published: May 21, 2022 License: MIT Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfig = Config{
	Format: `{"time":"${time_custom}","id":"${request_id}","remote_ip":"${remote_ip}",` +
		`"host":"${host}","method":"${method}","uri":"${uri}",` +
		`"status":${status},"error":"${error}","latency":${latency},"latency_human":"${latency_human}"` +
		`,"bytes_in":${bytes_in},"bytes_out":${bytes_out}}` + "\n",
	TimeFormat: "2006-01-02 15:04:05",
	TimeZone:   "Local",
	Output:     os.Stdout,
}

Functions

func New

func New(config ...Config) bytego.HandlerFunc

Types

type Config

type Config struct {
	Format string
	//Default: 2006-01-02 15:04:05
	TimeFormat string
	//Default: "Local"
	TimeZone string
	// Default: os.Stdout
	Output io.Writer
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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