I have a c++ tool that outputs to STDOUT via printf i.e.
printf ("%s\n", logline);
I then pipe that to rotatelogs i.e.
tool | rotatelogs /tmp/logs/log_%s 60
Everything works great, but rotatelogs will rotate mid line so log file 1 has this json snippet:
{"tim
...and log file 2 will have:
e":1386088072}
Is there a way to encourage rotatelogs to rotate on line breaks?