[node-patches] Change in ovirt-node[master]: init: Add support for logrotate_max_size cmdline args

fabiand at fedoraproject.org fabiand at fedoraproject.org
Fri Aug 9 09:58:25 UTC 2013


Fabian Deutsch has posted comments on this change.

Change subject: init: Add support for logrotate_max_size cmdline args
......................................................................


Patch Set 3: Code-Review-1

(2 comments)

....................................................
File src/ovirtnode/log.py
Line 201: 
Line 202: 
Line 203: def logrotate_auto():
Line 204:     logroate_max_size = ""
Line 205:     if not "OVIRT_LOGROTATE_MAX_SIZE" in _functions.OVIRT_VARS:
I suppose we can silently ignore the case where no max size is given. No need for a warning.
Line 206:         logger.warn("OVIRT_LOGROTATE_MAX_SIZE not found!")
Line 207:         return False
Line 208:     else:
Line 209:         logroate_max_size = _functions.OVIRT_VARS["OVIRT_LOGROTATE_MAX_SIZE"]


Line 211:             logger.info("Found! Using logroate_max_size " + logroate_max_size)
Line 212:             set_logrotate_size(logroate_max_size)
Line 213:             return True
Line 214:         else:
Line 215:             logger.warn("logroate_max_size not found!")
The message should be more along the line: "Invalid logrotate max size: %s" % log...
Because we eitehr got None or ""
Line 216:             return False
Line 217: 
Line 218: 
Line 219: def logging_auto():


-- 
To view, visit http://gerrit.ovirt.org/17707
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iea5aaea8e16390415db69458937d4bb495c9734d
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: hadong <hadong0720 at gmail.com>
Gerrit-Reviewer: Fabian Deutsch <fabiand at fedoraproject.org>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes



More information about the node-patches mailing list