summaryrefslogtreecommitdiff
path: root/doc/source
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-09-08 20:22:24 +0000
committerGerrit Code Review <review@openstack.org>2015-09-08 20:22:24 +0000
commit24ca952eb603e776b60ac282b028d2dc1b9289dd (patch)
tree1e858ffb8b773e24ffd21533ee377b87ef1ad65e /doc/source
parent7f24818994c573d2cc028cb5c6108468c4ae1d80 (diff)
parente23dd6de5854fcc8ff76fe1b51eb46162770d9cc (diff)
downloadpython-openstackclient-24ca952eb603e776b60ac282b028d2dc1b9289dd.tar.gz
Merge "Set up every time record log in file"
Diffstat (limited to 'doc/source')
-rw-r--r--doc/source/configuration.rst71
-rw-r--r--doc/source/man/openstack.rst21
2 files changed, 92 insertions, 0 deletions
diff --git a/doc/source/configuration.rst b/doc/source/configuration.rst
index 563a7193..c7700140 100644
--- a/doc/source/configuration.rst
+++ b/doc/source/configuration.rst
@@ -143,3 +143,74 @@ Debugging
You may find the :doc:`config show <command-objects/config>`
helpful to debug configuration issues. It will display your current
configuration.
+
+Logging Settings
+----------------
+
+By setting `log_level` or `log_file` in the configuration
+:file:`clouds.yaml`, a user may enable additional logging::
+
+ clouds:
+ devstack:
+ auth:
+ auth_url: http://192.168.122.10:35357/
+ project_name: demo
+ username: demo
+ password: 0penstack
+ region_name: RegionOne
+ operation_log:
+ logging: TRUE
+ file: /tmp/openstackclient_demo.log
+ level: info
+ ds-admin:
+ auth:
+ auth_url: http://192.168.122.10:35357/
+ project_name: admin
+ username: admin
+ password: 0penstack
+ region_name: RegionOne
+ log_file: /tmp/openstackclient_admin.log
+ log_level: debug
+
+:dfn:`log_file`: ``</path/file-name>``
+ Full path to logging file.
+:dfn:`log_level`: ``error`` | ``info`` | ``debug``
+ If log level is not set, ``warning`` will be used.
+
+If log level is ``info``, the following information is recorded:
+
+* cloud name
+* user name
+* project name
+* CLI start time (logging start time)
+* CLI end time
+* CLI arguments
+* CLI return value
+* and any ``info`` messages.
+
+If log level is ``debug``, the following information is recorded:
+
+* cloud name
+* user name
+* project name
+* CLI start time (logging start time)
+* CLI end time
+* CLI arguments
+* CLI return value
+* API request header/body
+* API response header/body
+* and any ``debug`` messages.
+
+When a command is executed, these logs are saved every time. Recording the user
+operations can help to identify resource changes and provide useful information
+for troubleshooting.
+
+If saving the output of a single command use the `--log-file` option instead.
+
+* `--log-file <LOG_FILE>`
+
+The logging level for `--log-file` can be set by using following options.
+
+* `-v, --verbose`
+* `-q, --quiet`
+* `--debug`
diff --git a/doc/source/man/openstack.rst b/doc/source/man/openstack.rst
index 53bf3629..3e47635e 100644
--- a/doc/source/man/openstack.rst
+++ b/doc/source/man/openstack.rst
@@ -123,6 +123,18 @@ OPTIONS
:option:`--os-interface` <interface>
Interface type. Valid options are `public`, `admin` and `internal`.
+:option:`--log-file` <LOGFILE>
+ Specify a file to log output. Disabled by default.
+
+:option:`-v, --verbose`
+ Increase verbosity of output. Can be repeated.
+
+:option:`-q, --quiet`
+ suppress output except warnings and errors
+
+:option:`--debug`
+ show tracebacks on errors and set verbosity to debug
+
COMMANDS
========
@@ -240,6 +252,15 @@ When :option:`--os-token` and :option:`--os-url` are both present the
:option:`--os-auth-url` and :option:`--os-username` are present ``password``
auth type is selected.
+Logging Settings
+----------------
+
+:program:`openstack` can record the operation history by logging settings
+in configuration file. Recording the user operation, it can identify the
+change of the resource and it becomes useful information for troubleshooting.
+
+See :doc:`../configuration` about Logging Settings for more details.
+
NOTES
=====