On Wed, Jan 22, 2020 at 12:56:00AM +0100, Claudio Jeker wrote:
> On Tue, Jan 21, 2020 at 03:58:58PM +0100, Remi Locherer wrote:
> > On Tue, Jan 21, 2020 at 01:09:30PM +0100, Denis Fondras wrote:
> > > On Tue, Jan 21, 2020 at 09:35:06AM +0100, Remi Locherer wrote:
> > > > > @@ -235,6 +233,7 @@ lsa_check(struct rde_nbr *nbr, struct ls
> > > > > case LSA_TYPE_NETWORK:
> > > > > if ((len % sizeof(u_int32_t)) ||
> > > > > len < sizeof(lsa->hdr) + sizeof(u_int32_t)) {
> > > > > + log_warnx("lsa_check: bad LSA network packet");
> > > >
> > > > please use __func__
> > > >
> > >
> > > None use __func__ currently.
> > >
> >
> > Right, it's not often used in ospf6d.
> >
> > I think we should use it more in such cases.
> >
> > But you have my OK with or without that.
> >
>
> I think the log_warnx should use __func__ less and instead use better
> messages that an operator can understand without having to check the code.
> As a developer 'lsa_check: bad LSA network packet' sounds great since I
> can find the code but as an operator 'dropped LSA network packet with bad
> size from neighbor XY' would be more effective. I'm probably the source of
> most of those messages that's why I think they could be better :)
> But changing those can happen some other time.
I agree with that point. But when the function name is used in a message
I prefer if __func__ is used.