Skip to content

Commit

Permalink
missing hostname in logs (#517)
Browse files Browse the repository at this point in the history
fix missing hostname in logs

Co-authored-by: Felipe Zipitría <[email protected]>
  • Loading branch information
M4tteoP and fzipi authored Jan 13, 2023
1 parent 5e45afd commit e9e29a5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions internal/corazarules/rule_match.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ func (mr *MatchedRule) Rule() types.RuleMetadata {
func (mr MatchedRule) details(matchData types.MatchData) string {
log := &strings.Builder{}

resolvedIP := ""
msg := matchData.Message()
data := matchData.Data()
if len(msg) > 200 {
Expand All @@ -136,7 +135,7 @@ func (mr MatchedRule) details(matchData types.MatchData) string {
log.WriteString(fmt.Sprintf(" [tag %q]", t))
}
log.WriteString(fmt.Sprintf(" [hostname %q] [uri %q] [unique_id %q]",
resolvedIP, mr.URI_, mr.TransactionID_))
mr.ServerIPAddress_, mr.URI_, mr.TransactionID_))
return log.String()
}

Expand Down

0 comments on commit e9e29a5

Please sign in to comment.