FreeBSD disable logging to syslog

Good evening,

I run Vaultwarden on my FreeBSD machine and with the following versions:

FreeBSD 13.1-RELEASE-p7 
vaultwarden-1.28.1_2           
vaultwarden_web-vault-2023.4.2

I have successfully enabled logging to my desired log file with:

LOG_FILE='/var/log/vaultwarden/vaultwarden.log'
export LOG_FILE

Unfortunaly, I am all logs are also send to syslog, so they appear in /var/log/messages. In my world, syslog should be for crutial system information and not logs about fetching an icon :wink:

So i tried to disable it with no success:

USE_SYSLOG=false
export USE_SYSLOG

EXTENDED_LOGGING=false
export EXTENDED_LOGGING

Anything I am doing wrong?
Thanks a lot for any hints. Really appreciate it!

You probably have used the admin interface, and have a config.json file in your data folder, and those settings there override all other settings.

Use the admin interface to change those settings and restart.

Thanks for your reply. I have indeed used the admin panel. Those settings are:

  1. Listed as read-only properties in the admin panel
  2. Disabled in the admin panel (like I set them up in the config)

I have checked /usr/local/www/vaultwarden/data/config.json and there are not settings concerning logging (like the admin panel suggested).

How is Vaultwarden started? If it is through some kind of services system, it could be it logs the stdout to syslog?

Yep, that could be the case. It is started through the service / rc.d system of FreeBSD. But I honestly don’t know how stdout is handled.

Is there a way to disable stdout of vaultwarden and only send it to logs?

Okay, so I have found out that the way the service is run through rc.d in FreeBSD, it will log the stdout to syslog.
I have contacted the maintainer if my suggested change makes sense. For everyone who is interested, the following needs to be changed in /usr/local/etc/rc.d/vaultwarden:

This line:

command_args="-p ${pidfile} -T ${name} ${task}" 

needs to be like this:

command_args="-f -p ${pidfile} ${task}"

Here is the reason why: daemon(8)

Thanks for your help @BlackDex . Issue is resolved.