You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/04/17 11:23:41 UTC

[GitHub] [pulsar-client-go] cornelk opened a new issue #228: ClientOptions should get a Logger field to allow injecting of an external Logger

cornelk opened a new issue #228: ClientOptions should get a Logger field to allow injecting of an external Logger
URL: https://github.com/apache/pulsar-client-go/issues/228
 
 
   It is available in the old cgo based go client library:
   
   ```
   	// Provide a custom logger implementation where all Pulsar library info/warn/error messages will be routed
   	// By default, log messages will be printed on standard output. By passing a logger function, application
   	// can determine how to print logs. This function will be called each time the Pulsar client library wants
   	// to write any logs.
   	Logger func(level log.LoggerLevel, file string, line int, message string)
   ```
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [pulsar-client-go] merlimat commented on issue #228: ClientOptions should get a Logger field to allow injecting of an external Logger

Posted by GitBox <gi...@apache.org>.
merlimat commented on issue #228: ClientOptions should get a Logger field to allow injecting of an external Logger
URL: https://github.com/apache/pulsar-client-go/issues/228#issuecomment-615900552
 
 
   @cornelk On the CGo library, this was done to plug into a go logger into the C++ library logger.
   
   In the new library, we're using Logrus for logging. You can easily configure Logrus (https://github.com/sirupsen/logrus)
   
   For example: https://github.com/apache/pulsar-client-go/blob/master/perf/pulsar-perf-go.go#L53
   
   The problem with the logger func, is that we'd be losing the structured logging information.
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services