aaab456 opened a new issue #604:
URL: https://github.com/apache/rocketmq-client-go/issues/604
```go
rlog.SetLogger(replacelog.NewLogger())
```
I replace logger with json formatter and get the output msg of log like this
```json
{"msg":"query topic route from server error", "fields":{"underlayError":{}}}
```
In fact, the error of "underlayError" structure is not nil, if we use
err.Error(), it will print out specific information
print the empty structure of error makes it difficult to locate the problem
link:
https://stackoverflow.com/questions/44989924/golang-error-types-are-empty-when-encoded-to-json
example
> github.com/apache/rocketmq-client-go/[email protected]/internal/route.go:134
```go
if err != nil {
rlog.Warning("query topic route from server error",
map[string]interface{}{
rlog.LogKeyUnderlayError: err, // <-- rlog.LogKeyUnderlayError:
err.Error(),
})
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]