Re: [systemd-devel] systemctl logs to journal/kmsg intended?

2023-06-21 Thread Christopher Wong
Hi Lennart,

Thanks for your response! We will investigate  it further why this is happening 
in v253 for us.

Sorry, for the confidentiality notice. Used the wrong signature.

Best regards,
Christopher Wong


Från: Lennart Poettering 
Skickat: tisdag 20 juni 2023 16:41
Till: Christopher Wong 
Kopia: systemd-devel@lists.freedesktop.org 
; Felix Nilsson 
Ämne: Re: [systemd-devel] systemctl logs to journal/kmsg intended?

On Di, 20.06.23 07:53, Christopher Wong (christopher.w...@axis.com) wrote:

> Hi,
>
> Is it intended that systemctl should send log messages to the
> journal and kmsg with this patch? Because previously it was only
> writing to console.

Nope. log_setup() doesn't do this, unless $SYSTEMD_LOG_TARGET= is
configured to do so, or journald is told to.

> commit 158fdd5326a750fe01fcaa76ac4a56fe197cf1aa
> Author: Yu Watanabe 
> watanabe.yu+git...@gmail.com<mailto:watanabe.yu+git...@gmail.com>
> Date:   Thu Jul 7 16:38:54 2022 +0900
>
> systemctl: enable colorized logging by default
>
> diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
> index 003d2f0c25..fa32c67a08 100644
> --- a/src/systemctl/systemctl.c
> +++ b/src/systemctl/systemctl.c
> @@ -1113,8 +1113,7 @@ static int run(int argc, char *argv[]) {
>  int r;
>  setlocale(LC_ALL, "");
> -log_parse_environment();
> -log_open();
> +log_setup();
>
>
> *Email Confidentiality Notice* This communication and any
> attached files are confidential and are only intended for the use of
> the individual or entity to which they are directed. They may
> contain information that is privileged and exempt from disclosure
> under applicable law. If an addressing or transmission error has
> misdirected this email, please notify the sender and delete it from
> your system. If you are not the intended recipient, you may not use,
> disclose, distribute, copy, print, or rely on this email.

You are posting this to a public mailing list, you know this? I
presume you don't actually mean this confidentiality notice, do you?

Lennart

--
Lennart Poettering, Berlin



Re: [systemd-devel] systemctl logs to journal/kmsg intended?

2023-06-20 Thread Lennart Poettering
On Di, 20.06.23 07:53, Christopher Wong (christopher.w...@axis.com) wrote:

> Hi,
>
> Is it intended that systemctl should send log messages to the
> journal and kmsg with this patch? Because previously it was only
> writing to console.

Nope. log_setup() doesn't do this, unless $SYSTEMD_LOG_TARGET= is
configured to do so, or journald is told to.

> commit 158fdd5326a750fe01fcaa76ac4a56fe197cf1aa
> Author: Yu Watanabe 
> watanabe.yu+git...@gmail.com
> Date:   Thu Jul 7 16:38:54 2022 +0900
>
> systemctl: enable colorized logging by default
>
> diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
> index 003d2f0c25..fa32c67a08 100644
> --- a/src/systemctl/systemctl.c
> +++ b/src/systemctl/systemctl.c
> @@ -1113,8 +1113,7 @@ static int run(int argc, char *argv[]) {
>  int r;
>  setlocale(LC_ALL, "");
> -log_parse_environment();
> -log_open();
> +log_setup();
>
>
> *Email Confidentiality Notice* This communication and any
> attached files are confidential and are only intended for the use of
> the individual or entity to which they are directed. They may
> contain information that is privileged and exempt from disclosure
> under applicable law. If an addressing or transmission error has
> misdirected this email, please notify the sender and delete it from
> your system. If you are not the intended recipient, you may not use,
> disclose, distribute, copy, print, or rely on this email.

You are posting this to a public mailing list, you know this? I
presume you don't actually mean this confidentiality notice, do you?

Lennart

--
Lennart Poettering, Berlin


[systemd-devel] systemctl logs to journal/kmsg intended?

2023-06-20 Thread Christopher Wong
Hi,

Is it intended that systemctl should send log messages to the journal and kmsg 
with this patch? Because previously it was only writing to console.

commit 158fdd5326a750fe01fcaa76ac4a56fe197cf1aa
Author: Yu Watanabe 
watanabe.yu+git...@gmail.com
Date:   Thu Jul 7 16:38:54 2022 +0900

systemctl: enable colorized logging by default

diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 003d2f0c25..fa32c67a08 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -1113,8 +1113,7 @@ static int run(int argc, char *argv[]) {
 int r;
 setlocale(LC_ALL, "");
-log_parse_environment();
-log_open();
+log_setup();


Best regards,

Christopher Wong
Senior Engineer

christopher.w...@axis.com
Tel (direct): +46 46 272 11 30
Mobile: +46 76 144 26 00

Axis Communications AB
Gränden 1, SE-223 69 Lund, Sweden
Tel: +46 46 272 18 00, Fax: +46 46 13 61 30, www.axis.com

Please consider the environment before printing this e-mail

*Email Confidentiality Notice*
This communication and any attached files are confidential and are only 
intended for the use of the individual or entity to which they are directed. 
They may contain information that is privileged and exempt from disclosure 
under applicable law. If an addressing or transmission error has misdirected 
this email, please notify the sender and delete it from your system. If you are 
not the intended recipient, you may not use, disclose, distribute, copy, print, 
or rely on this email.