Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom logger not passed to dcp client #34

Closed
Du-Li opened this issue Mar 21, 2023 · 2 comments
Closed

custom logger not passed to dcp client #34

Du-Li opened this issue Mar 21, 2023 · 2 comments

Comments

@Du-Li
Copy link

Du-Li commented Mar 21, 2023

Describe the bug
When passing a custom logger (e.g., the one in the standard library of golang), it is passed to the go-kafka-connect-couchbase part but not the go-dcp-client part.

To Reproduce
Steps to reproduce the behavior:

  1. Create a custom logger like logger = log.New(os.Stdout, "cb2kafka: ", log.Ldate | log.Ltime | log.Llongfile)
  2. Pass it to the connector like connector, err := cb2kafka.NewConnectorWithLoggers(configFile, mapper, logger, logger)
  3. Run the program and see logs like the following:

cb2kafka: 2023/03/21 15:34:40 /root/go-cb-connector/main.go:40: loading config file from: /etc/configs/config.yml
{"level":"debug","time":"2023-03-21T15:34:40Z","message":"loaded checkpoint"}
{"level":"debug","time":"2023-03-21T15:34:40Z","message":"stream started"}
{"level":"info","time":"2023-03-21T15:34:40Z","message":"dcp stream started"}
{"level":"info","time":"2023-03-21T15:34:40Z","message":"metric middleware registered on path /metrics"} {"level":"info","time":"2023-03-21T15:34:40Z","message":"api starting on port 8080"} cb2kafka: 2023/03/21 15:34:50 /go/pkg/mod/github.com/segmentio/[email protected]/writer.go:1123: writing 1 messages to dev-cb6-bucket-20230310 (partition: 28) │
{"level":"debug","time":"2023-03-21T15:34:50Z","message":"saved checkpoint"}

Expected behavior
All the logs should look like the first line.

Screenshots
N/A

Version (please complete the following information):

  • go-kafka-connect-couchbase v0.0.21
  • go-dcp-client v0.0.23

Additional context
Add any other context about the problem here.

@oguzyildirim
Copy link
Member

Hello @Du-Li we are planning to pass custom logger to dcp-client. thank you for contribution.

@erayarslan
Copy link
Member

fixed with v0.0.27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants