Is it possible to create a new device for example /dev/log1 where a specific application will write its log without polluting what the classic logread command reports?
the application in question is "ModemManager" which allows you to send the logs to a separate file.
In the Linux tradition, you'd just write to /var/log/<app>.log if you have minimal logging to just one file and /var/log/<app>/<function>.log for more sophisticated requirements (say, for an http server you might have separate access and error logs).
Since /var is by default just a link to /tmp on OpenWrt, I'd just use this to make clear what's going on and be consistent with convention.
It's true it makes more sense for a file to be created in /var/log
but there is a micro problem (which can be solved with crontab if there are no alternatives) the file would tend to grow without any control, so it occurred to me to take inspiration from:
I quote part of the document of interest to me: This is implemented as a ring buffer with fixed sized records stored in RAM.
and whether it is possible to allocate a small, closed-loop log like the one managed by logd
as I said alternatively I send the files to /var/log/modemmanager.log and set up a crontab that will empty the file every day (cat /dev/null > /var/log/modemmanager.log)
Yeah, that's my poor man's attempt at logrotate without adding any packages.
My knowledge here is pretty limited, I don't know of any package that would allow you to implement a ring buffer without writing some code. Maybe someone else has a real solution to this?