[systemd-devel] [PATCH 2/3 RFC] systemd: use structured logging for unit changes
Zbigniew Jędrzejewski-Szmek
zbyszek at in.waw.pl
Thu Oct 18 07:47:41 PDT 2012
On Thu, Oct 18, 2012 at 04:44:39PM +0200, Marius Tolzmann wrote:
>
> Hi..
>
> On 10/18/12 16:12, Zbigniew Jędrzejewski-Szmek wrote:
> > Information which unit a log entry pertains to enables systemctl
> > status to display more log messages.
> > ---
> > @@ -1022,7 +1024,11 @@ int exec_spawn(ExecCommand *command,
> >
> > r = exec_context_load_environment(context, &files_env);
> > if (r < 0) {
> > - log_error("Failed to load environment files: %s", strerror(-r));
> > + log_struct(LOG_ERR,
> > + "UNIT=%s", unit_id,
> > + "MESSAGE=Failed to load environment files: %s", strerror(-r),
> > + "ERRNO=%d", errno,
>
> shouldn't that be "ERRNO=%d", (-r), ?
Yeah, obviously. Thanks for catching that.
Zbyszek
More information about the systemd-devel
mailing list