From: Mark Jamsek Subject: Re: possible gotd log typo To: Omar Polo Cc: Game of Trees Date: Tue, 7 Feb 2023 23:31:23 +1100 On 23-02-07 09:48AM, Omar Polo wrote: > On 2023/02/07 16:10:48 +1100, Mark Jamsek wrote: > > Currently, running: > > > > # gotd -f /etc/gotd.conf > > > > produces the error report: > > > > gotd: : bad path "gotd": must be an absolute path > > > > I'm not sure if the second colon is an unintentional result of a typo or > > is indeed intended. If the former is the case, the following diff turns > > the same error report (without any regress fallout) into: > > > > gotd: bad path "gotd": must be an absolute path > > > > diff /home/mark/src/got > > commit - c9003c52fc7f70dd988402560adcd22709e74800 > > path + /home/mark/src/got > > blob - 5bb8770f6058679e049a234c6d8b4492640cfd7e > > file + gotd/log.c > > --- gotd/log.c > > +++ gotd/log.c > > @@ -166,9 +166,9 @@ vfatalc(int code, const char *emsg, va_list ap) > > sep = ""; > > } > > if (code) > > - logit(LOG_CRIT, "%s: %s%s", s, sep, strerror(code)); > > + logit(LOG_CRIT, "%s%s%s", s, sep, strerror(code)); > > else > > - logit(LOG_CRIT, "%s%s", sep, s); > > + logit(LOG_CRIT, "%s", s); > > } > > > > void > > Yep. vfatalc was prepending log_procname originally, but later vlog > was changed (see 6b5e612458) to prepend it, so that every log has the > procname prefix. `log_procname' was dropped from vfatalc then but the > extra sep remained. Thanks for the insight :) > playing with this made me also realize that we're still prepending the > procname in some logs (as in "listen: listen: shutting down") that we > could drop too. yes, nice! ok for me -- Mark Jamsek GPG: F2FF 13DE 6A06 C471 CA80 E6E2 2930 DC66 86EE CF68