include log rotation (taken from Flink under Apache licence)