Add trove-guestagnet.conf sample for log rotation

This change adds a configuration sample of guestagent
to use log rotation.

Change-Id: I2f2fb0d42f2f9d674daf3adff8725a365cc1a5b3
Closes-Bug: #1269615
This commit is contained in:
Masaki Matsushita 2016-08-08 16:20:09 +09:00
parent 58dc6bd79f
commit f80dd43297
2 changed files with 40 additions and 0 deletions

View File

@ -74,6 +74,7 @@ root_grant_option = True
# Directory and path for log files
log_dir = /var/log/trove/
log_file = logfile.txt
log_config_append = /etc/trove/trove-logging-guestagent.conf
[profiler]
# If False fully disable profiling feature.

View File

@ -0,0 +1,39 @@
[loggers]
keys=root
[handlers]
keys=file
[formatters]
keys=minimal,normal,debug
###########
# Loggers #
###########
[logger_root]
level=WARNING
handlers=file
################
# Log Handlers #
################
[handler_file]
class=logging.handlers.RotatingFileHandler
level=WARNING
formatter=normal
args=('/var/log/trove-guestagent.log', 'a', 100 * 1024 * 1024) # log file limit is 100MB
##################
# Log Formatters #
##################
[formatter_minimal]
format=%(message)s
[formatter_normal]
format=(%(name)s): %(asctime)s %(levelname)s %(message)s
[formatter_debug]
format=(%(name)s): %(asctime)s %(levelname)s %(module)s %(funcName)s %(message)s