libx52/proto_logging.html

151 lines
6.4 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libx52: Logging management</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">libx52
&#160;<span id="projectnumber">0.3.2</span>
</div>
<div id="projectbrief">Saitek X52/X52Pro drivers for Linux/Unix</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="x52d_protocol.html">X52 daemon socket communication protocol</a></li> </ul>
</div>
</div><!-- top -->
<div class="PageDoc"><div class="header">
<div class="headertitle">
<div class="title">Logging management </div> </div>
</div><!--header-->
<div class="contents">
<div class="toc"><h3>Table of Contents</h3>
<ul><li class="level1"><a href="#autotoc_md28">Modules</a></li>
<li class="level1"><a href="#autotoc_md29">Logging levels</a></li>
<li class="level1"><a href="#autotoc_md30">Show logging configuration</a></li>
<li class="level1"><a href="#autotoc_md31">Set logging configuration</a></li>
</ul>
</div>
<div class="textblock"><p>The <code>logging</code> commands allow the user to fine tune the logging configuration of <code>x52d</code> as well as adjust the log levels for either all the modules, or for each of the modules individually.</p>
<p>While the <code>-v</code> and <code>-q</code> command line options allow you to either increase the logging verbosity or suppress it entirely, they are required to be specified at program startup. On the other hand, having the <code>logging</code> commands allows the user to fine tune the logging while the daemon is running.</p>
<h1><a class="anchor" id="autotoc_md28"></a>
Modules</h1>
<p><code>x52d</code> is split into several modules as far as logging is concerned. The list of modules is below:</p>
<ul>
<li><code>Config</code> </li>
<li><code>Cllient</code> </li>
<li><code>Clock</code> </li>
<li><code>Command</code> </li>
<li><code>Device</code> </li>
<li><code>IO</code> </li>
<li><code>LED</code> </li>
<li><code>Mouse</code> </li>
<li><code>Notify</code> </li>
</ul>
<h1><a class="anchor" id="autotoc_md29"></a>
Logging levels</h1>
<p>The following is a list of supported logging levels. Each level logs the ones above it as well as the current level</p>
<ul>
<li><code>none</code> - Disable logging entirely</li>
<li><code>fatal</code> - Log fatal messages</li>
<li><code>error</code> - Log error messages</li>
<li><code>warning</code> - Log warning messages</li>
<li><code>info</code> - Log informational messages</li>
<li><code>debug</code> - Log debug messages</li>
<li><code>trace</code> - Log trace messages - useful for tracing program flow.</li>
<li><code>default</code> - Not a level, but used when configuring module log levels, makes the module log level fallback to the global log level.</li>
</ul>
<h1><a class="anchor" id="autotoc_md30"></a>
Show logging configuration</h1>
<p>The <code>logging show</code> command takes in an optional module name, as listed in the Modules section above. It returns the module name, if specified, and the log level for that module. If the module is configured to fallback to the global level, then it will return the global level.</p>
<p><b>Arguments</b> </p>
<ul>
<li><code>logging</code></li>
<li><code>show</code></li>
<li><em>module-name</em> (Optional)</li>
</ul>
<p><b>Returns</b> </p>
<ul>
<li><code>DATA</code></li>
<li><code><em>module-name</code></em> (if specified)</li>
<li><em>log-level</em> </li>
</ul>
<h1><a class="anchor" id="autotoc_md31"></a>
Set logging configuration</h1>
<p>The <code>logging set</code> command takes in the optional module name and the log level and sets the log level for that module, if specified, or the global level otherwise.</p>
<p><b>Arguments</b> </p>
<ul>
<li><code>logging</code></li>
<li><code>set</code></li>
<li><em>module-name</em> (Optional)</li>
<li><em>log-level</em> </li>
</ul>
<p><b>Returns</b> </p>
<ul>
<li><code>OK</code></li>
<li><code>logging</code></li>
<li><code>set</code></li>
<li><code><em>module-name</code></em> (if specified)</li>
<li><em>log-level</em> </li>
</ul>
</div></div><!-- contents -->
</div><!-- PageDoc -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>