diff options
author | Jenkins <jenkins@review.openstack.org> | 2013-02-11 20:26:42 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2013-02-11 20:26:42 +0000 |
commit | 86f5213f27d73e432d50cde30ca78fd23ff38e9d (patch) | |
tree | 4ada3e746058336d5dcf902c6edd4cdbfb1ed663 /keystone/config.py | |
parent | 688221a0e7f83fe32e5b828081a81d75b6ec253e (diff) | |
parent | 49447c26a410fface3f77d78f980a8274f2a701e (diff) | |
download | keystone-86f5213f27d73e432d50cde30ca78fd23ff38e9d.tar.gz keystone-86f5213f27d73e432d50cde30ca78fd23ff38e9d.tar.xz keystone-86f5213f27d73e432d50cde30ca78fd23ff38e9d.zip |
Merge "Sync latest cfg from oslo-incubator"
Diffstat (limited to 'keystone/config.py')
-rw-r--r-- | keystone/config.py | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/keystone/config.py b/keystone/config.py index 40af2fd6..707649a3 100644 --- a/keystone/config.py +++ b/keystone/config.py @@ -24,8 +24,46 @@ from keystone.openstack.common import cfg gettext.install('keystone', unicode=1) +_DEFAULT_LOG_FORMAT = "%(asctime)s %(levelname)8s [%(name)s] %(message)s" +_DEFAULT_LOG_DATE_FORMAT = "%Y-%m-%d %H:%M:%S" + +common_cli_opts = [ + cfg.BoolOpt('debug', + short='d', + default=False, + help='Print debugging output (set logging level to ' + 'DEBUG instead of default WARNING level).'), + cfg.BoolOpt('verbose', + short='v', + default=False, + help='Print more verbose output (set logging level to ' + 'INFO instead of default WARNING level).'), +] + +logging_cli_opts = [ + cfg.StrOpt('log-config', + metavar='PATH', + help='If this option is specified, the logging configuration ' + 'file specified is used and overrides any other logging ' + 'options specified. Please see the Python logging module ' + 'documentation for details on logging configuration ' + 'files.'), + cfg.StrOpt('log-date-format', + default=_DEFAULT_LOG_DATE_FORMAT, + metavar='DATE_FORMAT', + help='Format string for %%(asctime)s in log records. ' + 'Default: %(default)s'), + cfg.BoolOpt('use-syslog', + default=False, + help='Use syslog for logging.'), + cfg.StrOpt('syslog-log-facility', + default='LOG_USER', + help='syslog facility to receive log lines') +] CONF = cfg.CONF +CONF.register_cli_opts(common_cli_opts) +CONF.register_cli_opts(logging_cli_opts) def setup_logging(conf): |