Documentation ¶
Overview ¶
Package log implements basic but useful request (access) logging middleware.
Index ¶
Constants ¶
View Source
const ( // DefaultLogFilename is the default log filename. DefaultLogFilename = "query.log" // CommonLogFormat is the common log format. CommonLogFormat = `{remote} ` + CommonLogEmptyValue + ` [{when}] "{type} {class} {name} {proto} {size} {>do} {>bufsize}" {rcode} {rsize} {duration}` // CommonLogEmptyValue is the common empty log value. CommonLogEmptyValue = "-" // CombinedLogFormat is the combined log format. CombinedLogFormat = CommonLogFormat + ` "{>opcode}"` // DefaultLogFormat is the default log format. DefaultLogFormat = CommonLogFormat )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct { Next middleware.Handler Rules []Rule ErrorFunc func(dns.ResponseWriter, *dns.Msg, int) // failover error handler }
Logger is a basic request logging middleware.
Click to show internal directories.
Click to hide internal directories.