[systemd-devel] [PATCH 2/3 RFC] systemd: use structured logging for unit changes

Marius Tolzmann tolzmann at molgen.mpg.de
Thu Oct 18 07:44:39 PDT 2012


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), ?

I did not check the rest. It just hit my eyes 8)

Bye marius..


-- 
Dipl.-Inf. Marius Tolzmann <marius.tolzmann at molgen.mpg.de>
----------------------------------.------------------------------
MPI f. molekulare Genetik         |
Ihnestrasse 63-73, D-14195 Berlin |   ==> MarIuX GNU/Linux <==
Phone: +49 (0)30 8413 1709        |
----------------------------------^------------------------------
God put me on earth to accomplish a certain number of things.
Right now I am so far behind..
   ..I will never die.         <by calvin from calvin&hobbes ;)>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4572 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20121018/2150bc11/attachment.bin>


More information about the systemd-devel mailing list