mirror of
https://github.com/chubin/wttr.in
synced 2025-01-26 02:34:59 +00:00
Activate insternal access logging
This commit is contained in:
parent
d9afb06ac5
commit
a8e8aa7a52
1 changed files with 7 additions and 0 deletions
|
@ -73,7 +73,14 @@ func copyHeader(dst, src http.Header) {
|
|||
}
|
||||
|
||||
func main() {
|
||||
logger := NewRequestLogger(
|
||||
Conf.Logging.AccessLog,
|
||||
time.Duration(Conf.Logging.Interval)*time.Second)
|
||||
|
||||
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
|
||||
if err := logger.Log(r); err != nil {
|
||||
log.Println(err)
|
||||
}
|
||||
// printStat()
|
||||
response := processRequest(r)
|
||||
|
||||
|
|
Loading…
Reference in a new issue