[systemd-devel] [PATCH v3] log: be more verbose if dbus job fails
Michal Sekletar
msekleta at redhat.com
Fri Apr 10 04:11:03 PDT 2015
On Fri, Apr 10, 2015 at 01:04:52PM +0200, Lennart Poettering wrote:
> On Fri, 10.04.15 12:59, Michal Sekletar (msekleta at redhat.com) wrote:
>
> > On Fri, Apr 10, 2015 at 12:50:35PM +0200, Lennart Poettering wrote:
> > > On Fri, 10.04.15 12:40, Michal Sekletar (msekleta at redhat.com) wrote:
> > >
> > > > diff --git a/src/shared/log.c b/src/shared/log.c
> > > > index 646a1d6..839051a 100644
> > > > --- a/src/shared/log.c
> > > > +++ b/src/shared/log.c
> > > > @@ -1061,3 +1061,45 @@ void log_received_signal(int level, const struct signalfd_siginfo *si) {
> > > > void log_set_upgrade_syslog_to_journal(bool b) {
> > > > upgrade_syslog_to_journal = b;
> > > > }
> > >
> > > Hmm, what's the rationale for adding this to log.c? I mean, so far
> > > log.c contained mostly generic logging infrastructure.
> >
> > I put it in log.c because function is called from sd-bus/bus-util.c and it
> > seemed wrong to me that code from there would call function in
> > systemctl.c.
>
> But then, place it in bus-util.c?
I figure that would be the best now. Initially I thought that function might be
useful in future in other places too. That is why I did use memstream for
logging and then called log_error only once and also that is why I put it to
log.c.
Thanks,
Michal
More information about the systemd-devel
mailing list