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: NDaniel P. Berrange <berrange@redhat.com>
Showing
src/util/virrotatingfile.c
0 → 100644
src/util/virrotatingfile.h
0 → 100644
tests/virrotatingfiletest.c
0 → 100644
此差异已折叠。
想要评论请 注册 或 登录