geniusjoe commented on code in PR #1449:
URL: https://github.com/apache/pulsar-client-go/pull/1449#discussion_r2619827521


##########
examples/consumer-listener/consumer-listener.go:
##########
@@ -18,45 +18,65 @@
 package main
 
 import (
-       "fmt"
-       "log"
+       "io"
+       "log/slog"
+       "os"
 
        "github.com/apache/pulsar-client-go/pulsar"
+       pulsarlog "github.com/apache/pulsar-client-go/pulsar/log"
+       "gopkg.in/natefinch/lumberjack.v2"
 )
 
 func main() {
-       client, err := pulsar.NewClient(pulsar.ClientOptions{URL: 
"pulsar://localhost:6650"})
-       if err != nil {
-               log.Fatal(err)
+       fileLogger := &lumberjack.Logger{
+               Filename:   "/tmp/pulsar-go-sdk.log",
+               MaxSize:    100,
+               MaxBackups: 5,
+               LocalTime:  true,
        }
+       //      this multiLogger both print log to stdout and fileLogger

Review Comment:
   fixed



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to