<20240205133029.78834-1-naglis@mailbox.org>
--- I suspect this is a C/P leftover. Also I was wondering why in this case the logger on the rule (`rule.log`) is not used? rules/commercial-isp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rules/commercial-isp.go b/rules/commercial-isp.go index 5768cef..140a23d 100644 --- a/rules/commercial-isp.go +++ b/rules/commercial-isp.go @@ -75,7 +75,7 @@ func (rule *CommercialISPRule) Test(ctx context.Context, sample *model.Sample) i clientIP := net.ParseIP(*sample.IPAddress) if clientIP == nil { - log.Printf("Warning: block-tor-exit saw invalid IP '%s'", + log.Printf("Warning: block-commercial-isp saw invalid IP '%s'", *sample.IPAddress) return SKIP } -- 2.43.0
<CYX6ND0PV06D.3KHQLAXJ1DM9X@taiga>
<20240205133029.78834-1-naglis@mailbox.org>
(view parent)
This should use rule.log, can you send a v2?
<4il7osspyeg7xz5ilaenaug6wi63bsm64voqbljy3haycpcdzm@r4yapndm2bvy>
<CYX6ND0PV06D.3KHQLAXJ1DM9X@taiga>
(view parent)
This (log used instead of rule.log) happens in more places[1][2][3][4]. Should I update those as well? Also, IIUC, the rule name can be removed from the log message since it will be in the rule logger's prefix? [1]: https://git.sr.ht/~sircmpwn/abused/tree/92a5de3738eb770dcb218dd73d6ba14ed283bf9a/item/rules/networks.go#L74 [2]: https://git.sr.ht/~sircmpwn/abused/tree/92a5de3738eb770dcb218dd73d6ba14ed283bf9a/item/rules/networks.go#L93 [3]: https://git.sr.ht/~sircmpwn/abused/tree/92a5de3738eb770dcb218dd73d6ba14ed283bf9a/item/rules/networks.go#L96 [4]: https://git.sr.ht/~sircmpwn/abused/tree/92a5de3738eb770dcb218dd73d6ba14ed283bf9a/item/rules/tor-exit.go#L50
<CYX7OU49DFDA.1I0UV5DPX5YWI@taiga>
<4il7osspyeg7xz5ilaenaug6wi63bsm64voqbljy3haycpcdzm@r4yapndm2bvy>
(view parent)
Yeah, it would be great to use rule.log everywhere, and remove the redundant prefixes.