Move successfull policy checks to trace
We use policy .. a lot .. on an inactive system, we log at least 2-3 checks a second (at INFO!). We should log failures at info, and remain silent for the rest. if we need to enable TRACE logging (for debugging) we can add: 'designate.policy=TRACE', to the log.set_defaults() call in designate/__init__.py Change-Id: I2d059be9a5a127a687d0cb2cd02fa4915d1b6195
This commit is contained in:
parent
1a3b28610a
commit
ac081195b2
@ -97,7 +97,7 @@ def check(rule, ctxt, target=None, do_raise=True, exc=exceptions.Forbidden):
|
||||
extra = {'policy': {'rule': rule, 'target': target}}
|
||||
|
||||
if result:
|
||||
LOG.info(_("Policy check succeeded for rule '%(rule)s' "
|
||||
LOG.trace(_("Policy check succeeded for rule '%(rule)s' "
|
||||
"on target %(target)s"),
|
||||
{'rule': rule, 'target': repr(target)}, extra=extra)
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user