Merge pull request #250 from ramielrowe/master

Creating parent logger for usage audit
This commit is contained in:
Andrew Melton 2013-11-10 17:17:35 -08:00
commit c9c7962e8d

View File

@ -31,6 +31,7 @@ import usage_audit
from stacktach import datetime_to_decimal as dt
from stacktach import models
from stacktach.reconciler import Reconciler
from stacktach import stacklog
OLD_LAUNCHES_QUERY = """
select stacktach_instanceusage.id,
@ -268,6 +269,11 @@ if __name__ == '__main__':
default='/etc/stacktach/reconciler-config.json')
args = parser.parse_args()
stacklog.set_default_logger_name('nova_usage_audit')
parent_logger = stacklog.get_logger('nova_usage_audit', is_parent=True)
log_listener = stacklog.LogListener(parent_logger)
log_listener.start()
if args.reconcile:
with open(args.reconciler_config) as f:
reconciler_config = json.load(f)