Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultHandler ¶
DefaultHandler returns a http.Handler that wraps h by using Apache combined log output and print to os.Stdout
Types ¶
type Type ¶
type Type int
Type represents logger's type
const ( // Version is this package's version Version = "0.3.0" // CombineLoggerType is the standard Apache combined log output // // format: // // :remote-addr - :remote-user [:date[clf]] ":method :url // HTTP/:http-version" :status :res[content-length] ":referrer" ":user-agent" CombineLoggerType Type = iota // CommonLoggerType is the standard Apache common log output // // format: // // :remote-addr - :remote-user [:date[clf]] ":method :url // HTTP/:http-version" :status :res[content-length] CommonLoggerType // DevLoggerType is useful for development // // format: // // :method :url :status :response-time ms - :res[content-length] DevLoggerType // ShortLoggerType is shorter than common, including response time // // format: // // :remote-addr :remote-user :method :url HTTP/:http-version :status // :res[content-length] - :response-time ms ShortLoggerType // TinyLoggerType is the minimal ouput // // format: // // :method :url :status :res[content-length] - :response-time ms TinyLoggerType // Disable logging NoneLoggerType )
Click to show internal directories.
Click to hide internal directories.