]> xenbits.xensource.com Git - libvirt.git/commit
util: add APIs for reading/writing from/to rotating files
authorDaniel P. Berrange <berrange@redhat.com>
Fri, 6 Nov 2015 14:25:48 +0000 (14:25 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Thu, 26 Nov 2015 14:28:55 +0000 (14:28 +0000)
commit910e65d973339d67ecd86a75ea4bf764cb12c0e1
tree9fccb28b52a8620a730c06bb3ace279678a859da
parente24eda48cfae84a9003456b68eaf753a26123639
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>
po/POTFILES.in
src/Makefile.am
src/libvirt_private.syms
src/util/virrotatingfile.c [new file with mode: 0644]
src/util/virrotatingfile.h [new file with mode: 0644]
tests/Makefile.am
tests/virrotatingfiletest.c [new file with mode: 0644]