Following the update of the project requirements, we should now use the oslo.config namespace of oslo.log when generating ou Watcher config sample file. Change-Id: I7a1f3d555534b40c041b7f042f19fae231b7e80c Closes-Bug: #1518297
30 lines
898 B
Python
30 lines
898 B
Python
# -*- encoding: utf-8 -*-
|
|
# Copyright (c) 2015 b<>com
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
# implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
import logging
|
|
|
|
from oslo_config import cfg
|
|
from oslo_log import log
|
|
|
|
LOG = log.getLogger(__name__)
|
|
|
|
|
|
def prepare_service(args=None, conf=cfg.CONF):
|
|
log.register_options(conf)
|
|
log.setup(conf, 'watcher')
|
|
conf(args, project='python-watcher')
|
|
conf.log_opt_values(LOG, logging.DEBUG)
|