Skip to content

Commit

Permalink
chore: add stack
Browse files Browse the repository at this point in the history
  • Loading branch information
li-jin-gou committed Nov 25, 2023
1 parent 6b589bc commit 567749a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions apollo/apollo.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ package apollo

import (
"bytes"
"runtime/debug"
"sync"
"text/template"

"github.com/apolloconfig/agollo/v4/component/log"
"github.com/cloudwego/kitex/pkg/klog"
"github.com/shima-park/agollo"
)
Expand Down Expand Up @@ -87,7 +87,6 @@ type Options struct {
ServerKeyFormat string
ClientKeyFormat string
ApolloOptions []agollo.Option
CustomLogger log.LoggerInterface
ConfigParser ConfigParser
}

Expand All @@ -97,9 +96,6 @@ func NewClient(opts Options, optsfunc ...OptionFunc) (Client, error) {
if opts.ConfigServerURL == "" {
opts.ConfigServerURL = ApolloDefaultConfigServerURL
}
if opts.CustomLogger == nil {
opts.CustomLogger = NewCustomApolloLogger()
}
if opts.ConfigParser == nil {
opts.ConfigParser = defaultConfigParse()
}
Expand Down Expand Up @@ -271,7 +267,7 @@ func (c *client) RegisterConfigCallback(param ConfigParam,
func (c *client) listenConfig(param ConfigParam, stop chan bool, callback func(namespace, cluster, key, data string), uniqueID int64) {
defer func() {
if err := recover(); err != nil {
klog.Error("[apollo] listen goroutine error:", err)
klog.Error("[apollo] listen goroutine error: %v, stack: %s", err, string(debug.Stack()))
}
}()

Expand Down

0 comments on commit 567749a

Please sign in to comment.