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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'workhorse/internal/log/logging.go')
-rw-r--r--workhorse/internal/log/logging.go16
1 files changed, 12 insertions, 4 deletions
diff --git a/workhorse/internal/log/logging.go b/workhorse/internal/log/logging.go
index 80c09c1bf02..004ae8a8604 100644
--- a/workhorse/internal/log/logging.go
+++ b/workhorse/internal/log/logging.go
@@ -8,7 +8,7 @@ import (
"gitlab.com/gitlab-org/labkit/mask"
"golang.org/x/net/context"
- "gitlab.com/gitlab-org/gitlab/workhorse/internal/helper"
+ "gitlab.com/gitlab-org/gitlab/workhorse/internal/helper/exception"
)
type Fields = log.Fields
@@ -79,10 +79,18 @@ func Error(args ...interface{}) {
NewBuilder().Error(args...)
}
+func (b *Builder) trackException() {
+ if b.err != nil {
+ exception.Track(b.req, b.err, b.fields)
+ }
+}
+
func (b *Builder) Error(args ...interface{}) {
+ b.trackException()
b.entry.Error(args...)
+}
- if b.req != nil && b.err != nil {
- helper.CaptureRavenError(b.req, b.err, b.fields)
- }
+func (b *Builder) Fatal(args ...interface{}) {
+ b.trackException()
+ b.entry.Fatal(args...)
}