Re: [systemd-devel] Why systemd-journald is creating '/var/log/journal/machine_id" directory when Storage=auto

2021-08-29 Thread Michael Chapman
On Sun, 29 Aug 2021, Nishant Nayan wrote: > Awesome, thanks! > > Also, where can I find the code section where services And kernel logs to > journald? > After tracing from 'main' at journald.c I came across the part where > various sockets are opened and validated (/run/systemd/journal/stdout, >

Re: [systemd-devel] Why systemd-journald is creating '/var/log/journal/machine_id" directory when Storage=auto

2021-08-29 Thread Nishant Nayan
Awesome, thanks! Also, where can I find the code section where services And kernel logs to journald? After tracing from 'main' at journald.c I came across the part where various sockets are opened and validated (/run/systemd/journal/stdout, /dev/kmsg, /dev/log ) for journald to listen to logs of

Re: [systemd-devel] Why systemd-journald is creating '/var/log/journal/machine_id" directory when Storage=auto

2021-08-29 Thread Michael Chapman
On Sun, 29 Aug 2021, Nishant Nayan wrote: > Also I was wondering where in the code does journald.config file changes > are parsed? > For example in the above code , the line :- > if (s->storage == STORAGE_PERSISTENT) > Here, s->storage corresponds to 'Storage' option of conf file right? >

Re: [systemd-devel] Why systemd-journald is creating '/var/log/journal/machine_id" directory when Storage=auto

2021-08-29 Thread Nishant Nayan
Also I was wondering where in the code does journald.config file changes are parsed? For example in the above code , the line :- if (s->storage == STORAGE_PERSISTENT) Here, s->storage corresponds to 'Storage' option of conf file right? How is it getting set when we edit the conf file? Also,

Re: [systemd-devel] Why systemd-journald is creating '/var/log/journal/machine_id" directory when Storage=auto

2021-08-29 Thread Michael Chapman
On Sun, 29 Aug 2021, Nishant Nayan wrote: > I was looking into the code of systemd-journald and found this (in > system_journal_open() ) :- > > if (!s->system_journal && IN_SET(s->storage, STORAGE_PERSISTENT, > STORAGE_AUTO) && (flush_requested || flushed_flag_is_set())) { > > /* If

Re: [systemd-devel] Why systemd-journald is creating '/var/log/journal/machine_id" directory when Storage=auto

2021-08-29 Thread Michael Chapman
On Sun, 29 Aug 2021, Nishant Nayan wrote: > I was looking into the code of systemd-journald and found this (in > system_journal_open() ) :- > > if (!s->system_journal && IN_SET(s->storage, STORAGE_PERSISTENT, > STORAGE_AUTO) && (flush_requested || flushed_flag_is_set())) { > > /* If

[systemd-devel] Why systemd-journald is creating '/var/log/journal/machine_id" directory when Storage=auto

2021-08-29 Thread Nishant Nayan
I was looking into the code of systemd-journald and found this (in system_journal_open() ) :- if (!s->system_journal && IN_SET(s->storage, STORAGE_PERSISTENT, STORAGE_AUTO) && (flush_requested || flushed_flag_is_set())) { /* If in auto mode: first try to create the machine