Attempting to configure syslogd for logging doas

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Attempting to configure syslogd for logging doas

ben-2
I'm attempting to configure syslogd via syslog.conf. I've added two
lines which log all doas events:

        default configuration here...

        !doas
        *.* /var/log/doas

However, after restarting syslogd and attempting to running commands
through doas, /var/log/doas is not being created.

Am I missing something? Is this exclusive to doas? Thank you in
advance.

Ben Raskin.

Reply | Threaded
Open this post in threaded view
|

Re: Attempting to configure syslogd for logging doas

Raf Czlonka-2
On Wed, Feb 26, 2020 at 08:59:40PM GMT, [hidden email] wrote:

> I'm attempting to configure syslogd via syslog.conf. I've added two
> lines which log all doas events:
>
> default configuration here...
>
> !doas
> *.* /var/log/doas
>
> However, after restarting syslogd and attempting to running commands
> through doas, /var/log/doas is not being created.
>
> Am I missing something? Is this exclusive to doas? Thank you in
> advance.
>
> Ben Raskin.
>

Hi Ben,

After syslogd(8) manual page:

        CAVEATS
             syslogd does not create files, it only logs to existing ones.

So, in general, after you make your changes to syslog.conf(5), i.e.:

        # install -m 0600 /dev/null /var/log/doas && rcctl reload syslogd

Also, don't forget about newsyslog(8)!

BTW, in case you aren't aware, doas usage is already logged into
/var/log/secure.

Regards,

Raf

Reply | Threaded
Open this post in threaded view
|

Re: Attempting to configure syslogd for logging doas

ben-2
Hello, Raf;

After creating the doas log file I was able to syslog was able to write
messages to the file. I read the man page for newsyslog and have
configured it for the doas log. Thank you for you help.

Ben Raskin.