-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #307 from canonical/doc-log-level
Document the log manipulation facilities.
- Loading branch information
Showing
1 changed file
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
====================== | ||
Changing the log level | ||
====================== | ||
|
||
By default, the MicroCeph daemon runs with the log level set to DEBUG. While that is the desirable | ||
behaviour for a good number of use cases, there are instances when this level is far too high - | ||
for example, embedded devices where storage is much more limited. For these reasons, the MicroCeph | ||
daemon exposes a way to both get and set the log level. | ||
|
||
Configuring the log level | ||
------------------------- | ||
|
||
MicroCeph includes the command ``log``, with the sub-commands ``set-level`` and ``get-level``. When setting, we support both string and integer formats for the log level. For example: | ||
|
||
.. code-block:: none | ||
sudo microceph log set-level warning | ||
sudo microceph log set-level 3 | ||
Both commands are equivalent. The mapping from integer to string can be consulted by querying the | ||
help for the ``set-level`` sub-command. Note that any changes made to the log level take effect | ||
immediately, and need no restarts. | ||
|
||
On the other hand, the ``get-level`` sub-command takes no arguments and returns an integer level only. | ||
Any value returned by ``get-level`` can be used for ``set-level``. | ||
|
||
For example, after setting the level as shown in the example, we can verify in this way: | ||
|
||
.. code-block:: none | ||
sudo microceph log get-level | ||
3 | ||