Skip to content

Commit

Permalink
handler removed
Browse files Browse the repository at this point in the history
  • Loading branch information
c.arnheiter committed Aug 14, 2024
1 parent 030eb0d commit 7790730
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module github.com/z26100/log-go

go 1.15
go 1.22
13 changes: 3 additions & 10 deletions log.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@ package log

import (
"log"
"net/http"
)

type LogLevelType int
type LevelType int

const (
TRACE LogLevelType = iota
TRACE LevelType = iota
DEBUG
INFO
WARN
Expand All @@ -20,7 +19,7 @@ var (
LogLevel = INFO
)

func (l LogLevelType) String() string {
func (l LevelType) String() string {
switch l {
case TRACE:
return "TRACE"
Expand Down Expand Up @@ -117,9 +116,3 @@ func Error(args ...interface{}) {
func Fatal(err error) {
log.Fatal(err)
}
func Handler(handler http.Handler) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
Debugln("http request", r.Method, r.URL)
handler.ServeHTTP(w, r)
})
}

0 comments on commit 7790730

Please sign in to comment.