Firewall logs to files - naming convention

Hi,

I am testing firewall logging options with saving to file (USB stick) for future offline processing from files.
I noticed that if I there are multiple logs files created, the newest file log name is always in log ending with 0.txt and older files are renamed by numbers in order.. previously 0.txt file is renamed to1.txt after new log file is created, etc..

Is there way how to keep names of logs without change upon next file creation? if log file is initially created with xxx.0.txt it will remain 0.txt and new files will use name e.g. xxx.1.txt, xxx.2.txt?

Thanks.

This kind of naming is very common in linux when “logrotate” facility is used (the differentce is that in linux normally the file being actively written to has name without “index” (e.g. 0) in it). Plus it’s pretty easy to trim excess files and keep the “index” in file name coherent.

So I’d highly appreciate if current naming convention is kept in future.

Set file count to 1 and lines per file 2000…
1 + 1 = 1

Well, I hate that convention. I always change the logrotate config so it renames files to an index specifying the date.

# use date as a suffix of the rotated file
dateext

The reason is that I do not like to see the same file being renamed to different names later on. I use rsync backups to a filesystem with snapshots, so that is a waste of space.
Also, in a router the files are not really safe so I download the logs regularly to my computer. It is a nuisance that the same log.0.txt is a different file all the time and I have to carefully watch if it has already been rotated on the router to prevent overwriting an older log in the download directory. So I sure would appreciate a “dateext” checkmark in the log file config.

I agree that dateext is very useful option (if it’s handled properly by logrotate implementation). I just strongly disagree to deviate in ROS from the way index numbering works in general linux.