Skip to content

Commit

Permalink
remove logger func
Browse files Browse the repository at this point in the history
  • Loading branch information
yetisno committed Apr 21, 2023
1 parent 993a6f5 commit e391d41
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 27 deletions.
3 changes: 2 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module github.com/kklab-com/goth-panic
go 1.16

require (
github.com/kklab-com/goth-kklogger v1.0.1
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/stretchr/testify v1.2.2
)
7 changes: 0 additions & 7 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/kklab-com/goth-kklogger v1.0.1 h1:4QI3yr8PvaDsO3+6WB5FUcuNTQU6YN7R/AfMDv1Seno=
github.com/kklab-com/goth-kklogger v1.0.1/go.mod h1:rY/H6dS74JsWiiJQXiFBIy9Tru6kL67e/iu+4PX8QOk=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8 h1:JA8d3MPx/IToSyXZG/RhwYEtfrKO1Fxrqe8KrkiLXKM=
golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
19 changes: 0 additions & 19 deletions panic.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ import (
"runtime/debug"
"runtime/pprof"
"strings"

kklogger "github.com/kklab-com/goth-kklogger"
)

func CallStack() string {
Expand Down Expand Up @@ -65,23 +63,6 @@ func CallExcept(except interface{}, f func(r Caught)) {
}
}

func Log() {
Call(func(r Caught) {
kklogger.ErrorJ("panic.Log", r)
})
}

func LogExcept(except interface{}) {
CallExcept(except, func(r Caught) {
kklogger.ErrorJ("panic.Log", r)
})
}

func LogCatch(main func()) {
defer Log()
main()
}

func Catch(main func(), panic func(r Caught)) {
defer Call(panic)
main()
Expand Down

0 comments on commit e391d41

Please sign in to comment.