Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus/context.go')
-rw-r--r--vendor/github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus/context.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/vendor/github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus/context.go b/vendor/github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus/context.go
new file mode 100644
index 00000000..a39bb772
--- /dev/null
+++ b/vendor/github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus/context.go
@@ -0,0 +1,19 @@
+package grpc_logrus
+
+import (
+ "github.com/grpc-ecosystem/go-grpc-middleware/logging/logrus/ctxlogrus"
+ "github.com/sirupsen/logrus"
+ "golang.org/x/net/context"
+)
+
+// AddFields adds logrus fields to the logger.
+// Deprecated: should use the ctxlogrus.Extract instead
+func AddFields(ctx context.Context, fields logrus.Fields) {
+ ctxlogrus.AddFields(ctx, fields)
+}
+
+// Extract takes the call-scoped logrus.Entry from grpc_logrus middleware.
+// Deprecated: should use the ctxlogrus.Extract instead
+func Extract(ctx context.Context) *logrus.Entry {
+ return ctxlogrus.Extract(ctx)
+}