dcelasun commented on code in PR #2882:
URL: https://github.com/apache/thrift/pull/2882#discussion_r1398151860
##########
lib/go/thrift/simple_server.go:
##########
@@ -179,8 +179,18 @@ func (p *TSimpleServer) SetForwardHeaders(headers
[]string) {
//
// If no logger was set before Serve is called, a default logger using standard
// log library will be used.
-func (p *TSimpleServer) SetLogger(logger Logger) {
- p.logger = logger
+//
+// Deprecated: The logging inside TSimpleServer is now done via slog on error
+// level, this does nothing now. It will be removed in a future version.
+func (p *TSimpleServer) SetLogger(_ Logger) {}
+
+// SetLogContext sets the context to be used when logging errors inside
+// TSimpleServer.
+//
+// If this is not called before calling Serve, context.Background() will be
+// used.
+func (p *TSimpleServer) SetLogContext(ctx context.Context) {
Review Comment:
Sounds reasonable.
--
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]