You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by al...@apache.org on 2022/07/15 14:35:12 UTC

[dubbo-go] branch 3.0 updated: Fix: fix AssembleMsg bad use, pass []any as any in variadic function (#1964)

This is an automated email from the ASF dual-hosted git repository.

alexstocks pushed a commit to branch 3.0
in repository https://gitbox.apache.org/repos/asf/dubbo-go.git


The following commit(s) were added to refs/heads/3.0 by this push:
     new 5b0a87e8e Fix: fix AssembleMsg bad use, pass []any as any in variadic function (#1964)
5b0a87e8e is described below

commit 5b0a87e8ecd306ecde00533d81b4048f4c2bad88
Author: alingse <al...@foxmail.com>
AuthorDate: Fri Jul 15 22:35:05 2022 +0800

    Fix: fix AssembleMsg bad use, pass []any as any in variadic function (#1964)
    
    * build(deps): bump github.com/emicklei/go-restful/v3 from 3.7.4 to 3.8.0 (#1929)
    
    Bumps [github.com/emicklei/go-restful/v3](https://github.com/emicklei/go-restful) from 3.7.4 to 3.8.0.
    - [Release notes](https://github.com/emicklei/go-restful/releases)
    - [Changelog](https://github.com/emicklei/go-restful/blob/v3/CHANGES.md)
    - [Commits](https://github.com/emicklei/go-restful/compare/v3.7.4...v3.8.0)
    
    ---
    updated-dependencies:
    - dependency-name: github.com/emicklei/go-restful/v3
      dependency-type: direct:production
    ...
    
    Signed-off-by: dependabot[bot] <su...@github.com>
    
    Co-authored-by: dependabot[bot] <49...@users.noreply.github.com>
    
    * bugfix: remove consumer of polaris (#1962)
    
    * Fix: fix pass []any as any in variadic function `AssembleMsg`
    
    Co-authored-by: dependabot[bot] <49...@users.noreply.github.com>
    Co-authored-by: AlexStocks <al...@foxmail.com>
    Co-authored-by: 氕氘氚 <cj...@163.com>
---
 filter/sentinel/filter.go | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/filter/sentinel/filter.go b/filter/sentinel/filter.go
index fdedf8dba..009e77dca 100644
--- a/filter/sentinel/filter.go
+++ b/filter/sentinel/filter.go
@@ -57,7 +57,7 @@ type DubboLoggerWrapper struct {
 }
 
 func (d DubboLoggerWrapper) Debug(msg string, keysAndValues ...interface{}) {
-	d.Logger.Debug(logging.AssembleMsg(logging.GlobalCallerDepth, "DEBUG", msg, nil, keysAndValues))
+	d.Logger.Debug(logging.AssembleMsg(logging.GlobalCallerDepth, "DEBUG", msg, nil, keysAndValues...))
 }
 
 func (d DubboLoggerWrapper) DebugEnabled() bool {
@@ -65,7 +65,7 @@ func (d DubboLoggerWrapper) DebugEnabled() bool {
 }
 
 func (d DubboLoggerWrapper) Info(msg string, keysAndValues ...interface{}) {
-	d.Logger.Info(logging.AssembleMsg(logging.GlobalCallerDepth, "INFO", msg, nil, keysAndValues))
+	d.Logger.Info(logging.AssembleMsg(logging.GlobalCallerDepth, "INFO", msg, nil, keysAndValues...))
 }
 
 func (d DubboLoggerWrapper) InfoEnabled() bool {
@@ -73,7 +73,7 @@ func (d DubboLoggerWrapper) InfoEnabled() bool {
 }
 
 func (d DubboLoggerWrapper) Warn(msg string, keysAndValues ...interface{}) {
-	d.Logger.Warn(logging.AssembleMsg(logging.GlobalCallerDepth, "WARN", msg, nil, keysAndValues))
+	d.Logger.Warn(logging.AssembleMsg(logging.GlobalCallerDepth, "WARN", msg, nil, keysAndValues...))
 }
 
 func (d DubboLoggerWrapper) WarnEnabled() bool {
@@ -81,7 +81,7 @@ func (d DubboLoggerWrapper) WarnEnabled() bool {
 }
 
 func (d DubboLoggerWrapper) Error(err error, msg string, keysAndValues ...interface{}) {
-	d.Logger.Warn(logging.AssembleMsg(logging.GlobalCallerDepth, "ERROR", msg, err, keysAndValues))
+	d.Logger.Warn(logging.AssembleMsg(logging.GlobalCallerDepth, "ERROR", msg, err, keysAndValues...))
 }
 
 func (d DubboLoggerWrapper) ErrorEnabled() bool {