<p>daniel has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.osmocom.org/11617">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Logging: Describe all log options, including set-all and force-all<br><br>Change-Id: Ica03c3ea08289314819448a22ae7ed38a7bd4f83<br>---<br>M common/chapters/logging.adoc<br>1 file changed, 47 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals refs/changes/17/11617/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/common/chapters/logging.adoc b/common/chapters/logging.adoc</span><br><span>index db6afdb..a89526c 100644</span><br><span>--- a/common/chapters/logging.adoc</span><br><span>+++ b/common/chapters/logging.adoc</span><br><span>@@ -70,6 +70,53 @@</span><br><span> Management category to info, you can use the following command:</span><br><span>  `log level mm info`.</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+There is also a special command to set all categories as a one-off to a desired</span><br><span style="color: hsl(120, 100%, 40%);">+log level. For example, to silence all messages but those logged as notice and</span><br><span style="color: hsl(120, 100%, 40%);">+above issue the command: `log level set-all notice`</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Afterwards you can adjust specific categories as usual.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+A similar command is `log level force-all <level>` which causes all categories</span><br><span style="color: hsl(120, 100%, 40%);">+to behave as if set to log level <level> until the command is reverted with</span><br><span style="color: hsl(120, 100%, 40%);">+`no log level force-all` after which the individually-configured log levels will</span><br><span style="color: hsl(120, 100%, 40%);">+again take effect. The difference between `set-all` and `force-all` is that</span><br><span style="color: hsl(120, 100%, 40%);">+`set-all` actually changes the individual category settings while `force-all`</span><br><span style="color: hsl(120, 100%, 40%);">+is a (temporary) override of those settings and does not change them.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+[[log_options]]</span><br><span style="color: hsl(120, 100%, 40%);">+=== Log printing options</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+The logging system has various options to change the information</span><br><span style="color: hsl(120, 100%, 40%);">+displayed in the log message.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+log color 1::</span><br><span style="color: hsl(120, 100%, 40%);">+    With this option each log message will log with the color of its</span><br><span style="color: hsl(120, 100%, 40%);">+      category. The color is hard-coded and can not be changed. As with</span><br><span style="color: hsl(120, 100%, 40%);">+     other options a '0' disables this functionality.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+log timestamp 1::</span><br><span style="color: hsl(120, 100%, 40%);">+ Includes the current time in the log message. When logging to syslog</span><br><span style="color: hsl(120, 100%, 40%);">+  this option should not be needed, but may come in handy when debugging</span><br><span style="color: hsl(120, 100%, 40%);">+        an issue while logging to file.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+log print extended-timestamp 1::</span><br><span style="color: hsl(120, 100%, 40%);">+   In order to debug time-critical issues this option will print a</span><br><span style="color: hsl(120, 100%, 40%);">+       timestamp with millisecond granularity.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+log print category 1::</span><br><span style="color: hsl(120, 100%, 40%);">+     Prefix each log message with the category name.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+log print category-hex 1::</span><br><span style="color: hsl(120, 100%, 40%);">+ Prefix each log message with the category number in hex ('<000b>').</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+log print level 1::</span><br><span style="color: hsl(120, 100%, 40%);">+      Prefix each log message with the name of the log level.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+log print file 1::</span><br><span style="color: hsl(120, 100%, 40%);">+ Prefix each log message with the source file and line number. Append</span><br><span style="color: hsl(120, 100%, 40%);">+  the keyword `last` to append the file information instead of prefixing</span><br><span style="color: hsl(120, 100%, 40%);">+        it.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> [[log_filters]]</span><br><span> === Log filters</span><br><span> </span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/11617">change 11617</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/11617"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: osmo-gsm-manuals </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>
<div style="display:none"> Gerrit-Change-Id: Ica03c3ea08289314819448a22ae7ed38a7bd4f83 </div>
<div style="display:none"> Gerrit-Change-Number: 11617 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: daniel <dwillmann@sysmocom.de> </div>