I am developing on Linux with fairly strict disk usage restrictions. I would like to be able to specify an entry in a file of a fixed size. For example, if my application prints all the logs to stdout:
~/bin/myApp > /dev/debug1
and then to see the last output volume:
cat /dev/debug1
I would write, however, many debug1 bytes were set to save (if, at least, a lot was written there).
This post suggests using expecteither its library, but I was wondering if anyone had seen an implementation of a driver type like "pseudo-tty", as I would prefer not to link more libraries with my executable.
I understand that there are other mechanisms, such as logrotate , but I would prefer to have a non-cron solution.
Pointers, suggestions, questions are welcome!
source
share