Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add debug information for extracted data #3711

Merged
merged 6 commits into from
May 18, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
format
  • Loading branch information
3Xpl0it3r committed May 11, 2021
commit cbe99efc8435825ce1bca1e3ba30e8d484c9cce9
2 changes: 1 addition & 1 deletion clients/pkg/logentry/stages/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ func (j *jsonStage) Process(labels model.LabelSet, extracted map[string]interfac
extracted[n] = string(jm)
}
}
if Debug{
if Debug {
level.Debug(j.logger).Log("msg", "extracted data debug in json stage", "extracted data", fmt.Sprintf("%v", extracted))
}
}
Expand Down
2 changes: 1 addition & 1 deletion clients/pkg/logentry/stages/regex.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (r *regexStage) Process(labels model.LabelSet, extracted map[string]interfa
extracted[name] = match[i]
}
}
if Debug{
if Debug {
level.Debug(r.logger).Log("msg", "extracted data debug in regex stage", "extracted data", fmt.Sprintf("%v", extracted))
}
}
Expand Down
2 changes: 1 addition & 1 deletion clients/pkg/logentry/stages/replace.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ func (r *replaceStage) Process(labels model.LabelSet, extracted map[string]inter
}
}
}
if Debug{
if Debug {
level.Debug(r.logger).Log("msg", "extracted data debug in replace stage", "extracted data", fmt.Sprintf("%v", extracted))
}
}
Expand Down