Log location doesn't work, still writes to syslog
khadanja opened this issue · 1 comments
Set location here, can see logs in router gui. Not creating log file at the specified location.
log:
file: /mnt/Asus/entware/etc/AdGuardHome/AdGuardHome.log
max_backups: 0
max_size: 100
max_age: 3
compress: false
local_time: false
verbose: true
Set location here, can see logs in router gui. Not creating log file at the specified location. log: file: /mnt/Asus/entware/etc/AdGuardHome/AdGuardHome.log max_backups: 0 max_size: 100 max_age: 3 compress: false local_time: false verbose: true
That is because the log location is being specified inside the init.d script - "/opt/etc/init.d/S99AdGuardHome". You need to change the "syslog" inside the init.d script to the actual location of your logfile, then it will work i.e. "/opt/etc/AdGuardHome/AdGuardHome.log". Or simply change the line LOG_FILE="syslog" to #LOG_FILE="syslog" by commenting out the line. This will ensure that your listings in the .yaml file take priority.
https://github.com/jumpsmm7/Asuswrt-Merlin-AdGuardHome-Installer/blob/master/S99AdGuardHome#L5-L12
Just note, this is not an actual "issue" persay, it is a side-effect of the log location being specified in the launch command of AdGuardHome. The only way you will change this behavior is if the developers of AdGuardHome change the "default behavior" of log location priority. Currently the launch command log location variables get priority over the location specified in the .yaml file. This is not a behavior I can change without making it impossible for those who prefer "syslog", so I am closing this issue you have open. In my opinion, the developers of AdGuardHome should consider what the user lists inside the .yaml file to be taken as priority over what is mentioned in the adguardhome launching command line arguments. Obviously if the user has gone out of their way to specify a location inside the .yaml file as the log file, then that should always have priority. I hope you understand I have no control over this behavior without making those who rely on syslog to show log behaviors, blind to what is happening with the operation of their individual AdGuardHome instance.