Page MenuHomeVyOS Platform

'delete log file' does not work
Closed, ResolvedPublic

Description

the command "delete log file" only works when any file is present in /var/log/user and mostly no files are written in this directory

[email protected]:~$ delete log file messages
File does not exist

Details

Difficulty level
Unknown (require assessment)
Version
VyOS 1.2.7 1.4-rolling-202105192127
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)

Event Timeline

When the following command "set system syslog file <filename> facility <keyword> level <keyword>" is applied, then the files are stored in the /var/log/user directory. These files can be deleted using the command "delete log file <text>"

Updated the documentation:

https://docs.vyos.io/en/latest/configuration/system/syslog.html#delete-logs

[email protected]# run sh conf comm |grep syslog
set system syslog file test facility auth level 'all'

[email protected]# ls -ltr /var/log/user
total 4
-rw-r----- 1 root adm 561 May 30 08:50 test

[email protected]:~$ delete log file test
[email protected]:~$ ls -ltr /var/log/user/
total 0

The file will be recreated once new events are generated.

Maybe a completion helper could work here, too?

thank you for the suggestion, I will work on this.

SrividyaA triaged this task as Low priority.