log

package
v0.0.0-...-12912d6 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2020 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Logger *log.Logger
)

Logger represents a standard logger sets up for this application usage

Functions

func CloseFile

func CloseFile()

CloseFile close the log file on exit

func GetCityAndCountryFromRequest

func GetCityAndCountryFromRequest(req *http.Request) string

GetCityAndCountryFromRequest returns a string containing the city and the contry where the request is from If the city is fetched from the built-in memory cache, it is NOT suffixed by a dot (.)

func Middleware

func Middleware(next http.Handler) http.Handler

Middleware allow extensive logging of requests for debug and development purposes only

func SetFile

func SetFile(file string)

SetFile set a file to log to instead of standard output

Types

This section is empty.

Jump to

Keyboard shortcuts

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