Log rotation without surprises

Rotation by size catches the day when a client misbehaves and writes a gigabyte of errors in an hour. Rotation by time alone does not. A cap of a few files of a few megabytes each is plenty for a small service.
copytruncate is convenient but loses the lines written between the copy and the truncate. When the program can reopen its log on a signal, prefer that and send the signal from the rotation hook.