Log Rotate based on filesize with Timestamp of lines, open source C code (Apache License, Version 2.0). Do not require any external code/lib.
For more information look at our docs located at doc and wiki .
Read from stdin and output lines with timestamp in an output file (pathname), rotating them when file size exceeds specified size in bytes.
About versions (for more infos check CHANGELOG.md)
v0.2.0 - first version that can use - like a fork in project ggrandes/logrotate -every thing is OK to use **explain- will create just 2 files. ex: file.log when full create file.log.old and when full switch to the first file again file.log
v0.1.0 - dont recomend to use, is forks about old project - have a lot problemas and bugs to fix
gcc -Wall -O2 logrotate.c -o logrotate
./process-to-log | ./logrotate <pathname> <size-limit-bytes>
./process-to-log | ./logrotate file.log 100
2013-06-02 00:47:51 > Lorem ipsum dolor sit amet, consectetur adipiscing elit.
2013-06-02 00:47:51 > Pellentesque in mi ac tellus porttitor condimentum.
./logrotate help
./logrotate --help
./logrotate -h
./logrotate version
./logrotate --version
./logrotate --v
./logrotate copyright
./logrotate --copyright
sudo su -
sudo apt-get install gcc -y
cd ~
rm -fr logrotate2/
git clone https://github.com/pedroAkiraDanno/logrotate2.git
cd logrotate2/src/
chmod +x process-to-log test1
gcc -Wall -O2 logrotate.c -o logrotate
#OR
gcc logrotate.c -o logrotate
./test1 | ./logrotate file.log 100
Copyright 24/09/2020 - 2022
Inspired in rotatelogs , cronolog , logrotete and rsyslog, this is C-minimalistic version. © Pedro Akira