Commit Graph

2 Commits

Author SHA1 Message Date
Martin Kletzander
de9ff3efe1 util: Avoid variable named 'truncate' shadowing global declaration
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2015-11-30 15:32:47 +01:00
Daniel P. Berrange
910e65d973 util: add APIs for reading/writing from/to rotating files
Add virRotatingFileReader and virRotatingFileWriter objects
which allow reading & writing from/to files with automation
rotation to N backup files when a size limit is reached. This
is useful for guest logging when a guaranteed finite size
limit is required. Use of external tools like logrotate is
inadequate since it leaves the possibility for guest to DOS
the host in between invokations of logrotate.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2015-11-26 14:28:55 +00:00