/usr/share/doc/python-cement-doc/html/api/ext/ext_logging.html is in python-cement-doc 2.10.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 | <!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>cement.ext.ext_logging — Cement 2.10.0 documentation</title>
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="top" title="Cement 2.10.0 documentation" href="../../index.html"/>
<link rel="up" title="API Reference" href="../index.html"/>
<link rel="next" title="cement.ext.ext_memcached" href="ext_memcached.html"/>
<link rel="prev" title="cement.ext.ext_json_configobj" href="ext_json_configobj.html"/>
<script src="../../_static/js/modernizr.min.js"></script>
</head>
<body class="wy-body-for-nav" role="document">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search">
<a href="../../index.html" class="icon icon-home"> Cement
</a>
<div class="version">
2.10
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="../../search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="../../changes.html">ChangeLog</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../contributors.html">Contributors</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../upgrading.html">Upgrading</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../whats_new.html">What’s New</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../projects_built_on_cement.html">Projects Built on Cement™</a></li>
<li class="toctree-l1"><a class="reference internal" href="../../faq.html">Frequenty Asked Questions</a></li>
<li class="toctree-l1 current"><a class="reference internal" href="../index.html">API Reference</a><ul class="current">
<li class="toctree-l2"><a class="reference internal" href="../index.html#cement-core-modules">Cement Core Modules</a></li>
<li class="toctree-l2"><a class="reference internal" href="../index.html#cement-utility-modules">Cement Utility Modules</a></li>
<li class="toctree-l2 current"><a class="reference internal" href="../index.html#cement-extension-modules">Cement Extension Modules</a><ul class="current">
<li class="toctree-l3"><a class="reference internal" href="ext_alarm.html"><code class="docutils literal"><span class="pre">cement.ext.ext_alarm</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="ext_argcomplete.html"><code class="docutils literal"><span class="pre">cement.ext.ext_argcomplete</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="ext_argparse.html"><code class="docutils literal"><span class="pre">cement.ext.ext_argparse</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="ext_colorlog.html"><code class="docutils literal"><span class="pre">cement.ext.ext_colorlog</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="ext_configobj.html"><code class="docutils literal"><span class="pre">cement.ext.ext_configobj</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="ext_configparser.html"><code class="docutils literal"><span class="pre">cement.ext.ext_configparser</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="ext_daemon.html"><code class="docutils literal"><span class="pre">cement.ext.ext_daemon</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="ext_dummy.html"><code class="docutils literal"><span class="pre">cement.ext.ext_dummy</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="ext_genshi.html"><code class="docutils literal"><span class="pre">cement.ext.ext_genshi</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="ext_handlebars.html"><code class="docutils literal"><span class="pre">cement.ext.ext_handlebars</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="ext_jinja2.html"><code class="docutils literal"><span class="pre">cement.ext.ext_jinja2</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="ext_json.html"><code class="docutils literal"><span class="pre">cement.ext.ext_json</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="ext_json_configobj.html"><code class="docutils literal"><span class="pre">cement.ext.ext_json_configobj</span></code></a></li>
<li class="toctree-l3 current"><a class="current reference internal" href="#"><code class="docutils literal"><span class="pre">cement.ext.ext_logging</span></code></a><ul>
<li class="toctree-l4"><a class="reference internal" href="#requirements">Requirements</a></li>
<li class="toctree-l4"><a class="reference internal" href="#configuration">Configuration</a></li>
<li class="toctree-l4"><a class="reference internal" href="#usage">Usage</a></li>
</ul>
</li>
<li class="toctree-l3"><a class="reference internal" href="ext_memcached.html"><code class="docutils literal"><span class="pre">cement.ext.ext_memcached</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="ext_mustache.html"><code class="docutils literal"><span class="pre">cement.ext.ext_mustache</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="ext_plugin.html"><code class="docutils literal"><span class="pre">cement.ext.ext_plugin</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="ext_redis.html"><code class="docutils literal"><span class="pre">cement.ext.ext_redis</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="ext_reload_config.html"><code class="docutils literal"><span class="pre">cement.ext.ext_reload_config</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="ext_smtp.html"><code class="docutils literal"><span class="pre">cement.ext.ext_smtp</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="ext_tabulate.html"><code class="docutils literal"><span class="pre">cement.ext.ext_tabulate</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="ext_yaml.html"><code class="docutils literal"><span class="pre">cement.ext.ext_yaml</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="ext_yaml_configobj.html"><code class="docutils literal"><span class="pre">cement.ext.ext_yaml_configobj</span></code></a></li>
<li class="toctree-l3"><a class="reference internal" href="ext_watchdog.html"><code class="docutils literal"><span class="pre">cement.ext.ext_watchdog</span></code></a></li>
</ul>
</li>
</ul>
</li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../dev/index.html">Developer Documentation</a></li>
</ul>
<ul>
<li class="toctree-l1"><a class="reference internal" href="../../examples/index.html">Examples</a></li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
<nav class="wy-nav-top" role="navigation" aria-label="top navigation">
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="../../index.html">Cement</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="breadcrumbs navigation">
<ul class="wy-breadcrumbs">
<li><a href="../../index.html">Docs</a> »</li>
<li><a href="../index.html">API Reference</a> »</li>
<li><code class="docutils literal"><span class="pre">cement.ext.ext_logging</span></code></li>
<li class="wy-breadcrumbs-aside">
<a href="../../_sources/api/ext/ext_logging.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<div class="section" id="cement-ext-ext-logging">
<span id="id1"></span><h1><a class="reference internal" href="#module-cement.ext.ext_logging" title="cement.ext.ext_logging"><code class="xref py py-mod docutils literal"><span class="pre">cement.ext.ext_logging</span></code></a><a class="headerlink" href="#cement-ext-ext-logging" title="Permalink to this headline">¶</a></h1>
<span class="target" id="module-cement.ext.ext_logging"></span><p>The Logging Extension provides log handling based on
the standard <code class="xref py py-class docutils literal"><span class="pre">logging.Logger</span></code>, and is the default log
handler used by Cement.</p>
<div class="section" id="requirements">
<h2>Requirements<a class="headerlink" href="#requirements" title="Permalink to this headline">¶</a></h2>
<blockquote>
<div><ul class="simple">
<li>No external dependencies.</li>
</ul>
</div></blockquote>
</div>
<div class="section" id="configuration">
<h2>Configuration<a class="headerlink" href="#configuration" title="Permalink to this headline">¶</a></h2>
<p>This extension honors the following configuration settings from the config
section <code class="docutils literal"><span class="pre">log.logging</span></code>:</p>
<blockquote>
<div><ul class="simple">
<li>level</li>
<li>file</li>
<li>to_console</li>
<li>rotate</li>
<li>max_bytes</li>
<li>max_files</li>
</ul>
</div></blockquote>
<p>A sample config section (in any config file) might look like:</p>
<div class="highlight-text"><div class="highlight"><pre><span></span>[log.logging]
file = /path/to/config/file
level = info
to_console = true
rotate = true
max_bytes = 512000
max_files = 4
</pre></div>
</div>
</div>
<div class="section" id="usage">
<h2>Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h2>
<div class="highlight-python"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">cement.core.foundation</span> <span class="kn">import</span> <span class="n">CementApp</span>
<span class="k">with</span> <span class="n">MyApp</span><span class="p">()</span> <span class="k">as</span> <span class="n">app</span><span class="p">:</span>
<span class="n">app</span><span class="o">.</span><span class="n">log</span><span class="o">.</span><span class="n">info</span><span class="p">(</span><span class="s2">"This is an info message"</span><span class="p">)</span>
<span class="n">app</span><span class="o">.</span><span class="n">log</span><span class="o">.</span><span class="n">warning</span><span class="p">(</span><span class="s2">"This is an warning message"</span><span class="p">)</span>
<span class="n">app</span><span class="o">.</span><span class="n">log</span><span class="o">.</span><span class="n">error</span><span class="p">(</span><span class="s2">"This is an error message"</span><span class="p">)</span>
<span class="n">app</span><span class="o">.</span><span class="n">log</span><span class="o">.</span><span class="n">fatal</span><span class="p">(</span><span class="s2">"This is a fatal message"</span><span class="p">)</span>
<span class="n">app</span><span class="o">.</span><span class="n">log</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="s2">"This is a debug message"</span><span class="p">)</span>
</pre></div>
</div>
<dl class="class">
<dt id="cement.ext.ext_logging.LoggingLogHandler">
<em class="property">class </em><code class="descclassname">cement.ext.ext_logging.</code><code class="descname">LoggingLogHandler</code><span class="sig-paren">(</span><em>*args</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#cement.ext.ext_logging.LoggingLogHandler" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="../core/log.html#cement.core.log.CementLogHandler" title="cement.core.log.CementLogHandler"><code class="xref py py-class docutils literal"><span class="pre">cement.core.log.CementLogHandler</span></code></a></p>
<p>This class is an implementation of the <a class="reference internal" href="../core/log.html#cement-core-log"><span class="std std-ref">ILog</span></a>
interface, and sets up the logging facility using the standard Python
<a class="reference external" href="http://docs.python.org/library/logging.html">logging</a> module.</p>
<dl class="class">
<dt id="cement.ext.ext_logging.LoggingLogHandler.Meta">
<em class="property">class </em><code class="descname">Meta</code><a class="headerlink" href="#cement.ext.ext_logging.LoggingLogHandler.Meta" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <code class="xref py py-class docutils literal"><span class="pre">object</span></code></p>
<p>Handler meta-data.</p>
<dl class="attribute">
<dt id="cement.ext.ext_logging.LoggingLogHandler.Meta.clear_loggers">
<code class="descname">clear_loggers</code><em class="property"> = []</em><a class="headerlink" href="#cement.ext.ext_logging.LoggingLogHandler.Meta.clear_loggers" title="Permalink to this definition">¶</a></dt>
<dd><p>List of logger namespaces to clear. Useful when imported software
also sets up logging and you end up with duplicate log entries.</p>
<p>Changes in Cement 2.1.3. Previous versions only supported
<cite>clear_loggers</cite> as a boolean, but did fully support clearing
non-app logging namespaces.</p>
</dd></dl>
<dl class="attribute">
<dt id="cement.ext.ext_logging.LoggingLogHandler.Meta.config_defaults">
<code class="descname">config_defaults</code><em class="property"> = {'rotate': False, 'max_files': 4, 'file': None, 'max_bytes': 512000, 'level': 'INFO', 'to_console': True}</em><a class="headerlink" href="#cement.ext.ext_logging.LoggingLogHandler.Meta.config_defaults" title="Permalink to this definition">¶</a></dt>
<dd><p>The default configuration dictionary to populate the <code class="docutils literal"><span class="pre">log</span></code>
section.</p>
</dd></dl>
<dl class="attribute">
<dt id="cement.ext.ext_logging.LoggingLogHandler.Meta.console_format">
<code class="descname">console_format</code><em class="property"> = '%(levelname)s: %(message)s'</em><a class="headerlink" href="#cement.ext.ext_logging.LoggingLogHandler.Meta.console_format" title="Permalink to this definition">¶</a></dt>
<dd><p>The logging format for the consoler logger.</p>
</dd></dl>
<dl class="attribute">
<dt id="cement.ext.ext_logging.LoggingLogHandler.Meta.debug_format">
<code class="descname">debug_format</code><em class="property"> = '%(asctime)s (%(levelname)s) %(namespace)s : %(message)s'</em><a class="headerlink" href="#cement.ext.ext_logging.LoggingLogHandler.Meta.debug_format" title="Permalink to this definition">¶</a></dt>
<dd><p>The logging format for both file and console if <code class="docutils literal"><span class="pre">debug==True</span></code>.</p>
</dd></dl>
<dl class="attribute">
<dt id="cement.ext.ext_logging.LoggingLogHandler.Meta.file_format">
<code class="descname">file_format</code><em class="property"> = '%(asctime)s (%(levelname)s) %(namespace)s : %(message)s'</em><a class="headerlink" href="#cement.ext.ext_logging.LoggingLogHandler.Meta.file_format" title="Permalink to this definition">¶</a></dt>
<dd><p>The logging format for the file logger.</p>
</dd></dl>
<dl class="attribute">
<dt id="cement.ext.ext_logging.LoggingLogHandler.Meta.formatter_class">
<code class="descname">formatter_class</code><a class="headerlink" href="#cement.ext.ext_logging.LoggingLogHandler.Meta.formatter_class" title="Permalink to this definition">¶</a></dt>
<dd><p>Class to use as the formatter</p>
<p>alias of <code class="xref py py-class docutils literal"><span class="pre">Formatter</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="cement.ext.ext_logging.LoggingLogHandler.Meta.interface">
<code class="descname">interface</code><a class="headerlink" href="#cement.ext.ext_logging.LoggingLogHandler.Meta.interface" title="Permalink to this definition">¶</a></dt>
<dd><p>The interface that this class implements.</p>
<p>alias of <code class="xref py py-class docutils literal"><span class="pre">ILog</span></code></p>
</dd></dl>
<dl class="attribute">
<dt id="cement.ext.ext_logging.LoggingLogHandler.Meta.label">
<code class="descname">label</code><em class="property"> = 'logging'</em><a class="headerlink" href="#cement.ext.ext_logging.LoggingLogHandler.Meta.label" title="Permalink to this definition">¶</a></dt>
<dd><p>The string identifier of this handler.</p>
</dd></dl>
<dl class="attribute">
<dt id="cement.ext.ext_logging.LoggingLogHandler.Meta.namespace">
<code class="descname">namespace</code><em class="property"> = None</em><a class="headerlink" href="#cement.ext.ext_logging.LoggingLogHandler.Meta.namespace" title="Permalink to this definition">¶</a></dt>
<dd><p>The logging namespace.</p>
<p>Note: Although Meta.namespace defaults to None, Cement will set
this to the application label (CementApp.Meta.label) if not set
during setup.</p>
</dd></dl>
</dd></dl>
<dl class="method">
<dt id="cement.ext.ext_logging.LoggingLogHandler._setup_console_log">
<code class="descclassname">LoggingLogHandler.</code><code class="descname">_setup_console_log</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#cement.ext.ext_logging.LoggingLogHandler._setup_console_log" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a console log handler.</p>
</dd></dl>
<dl class="method">
<dt id="cement.ext.ext_logging.LoggingLogHandler._setup_file_log">
<code class="descclassname">LoggingLogHandler.</code><code class="descname">_setup_file_log</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#cement.ext.ext_logging.LoggingLogHandler._setup_file_log" title="Permalink to this definition">¶</a></dt>
<dd><p>Add a file log handler.</p>
</dd></dl>
<dl class="method">
<dt id="cement.ext.ext_logging.LoggingLogHandler.clear_loggers">
<code class="descclassname">LoggingLogHandler.</code><code class="descname">clear_loggers</code><span class="sig-paren">(</span><em>namespace</em><span class="sig-paren">)</span><a class="headerlink" href="#cement.ext.ext_logging.LoggingLogHandler.clear_loggers" title="Permalink to this definition">¶</a></dt>
<dd><p>Clear any previously configured loggers for <code class="docutils literal"><span class="pre">namespace</span></code>.</p>
</dd></dl>
<dl class="method">
<dt id="cement.ext.ext_logging.LoggingLogHandler.debug">
<code class="descclassname">LoggingLogHandler.</code><code class="descname">debug</code><span class="sig-paren">(</span><em>msg</em>, <em>namespace=None</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#cement.ext.ext_logging.LoggingLogHandler.debug" title="Permalink to this definition">¶</a></dt>
<dd><p>Log to the DEBUG facility.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>msg</strong> – The message to log.</li>
<li><strong>namespace</strong> – A log prefix, generally the module <code class="docutils literal"><span class="pre">__name__</span></code> that
the log is coming from. Will default to self._meta.namespace if
None is passed. For debugging, it can be useful to set this to
<code class="docutils literal"><span class="pre">__file__</span></code>, though <code class="docutils literal"><span class="pre">__name__</span></code> is much less verbose.</li>
<li><strong>kw</strong> – Keyword arguments are passed on to the backend logging
system.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="cement.ext.ext_logging.LoggingLogHandler.error">
<code class="descclassname">LoggingLogHandler.</code><code class="descname">error</code><span class="sig-paren">(</span><em>msg</em>, <em>namespace=None</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#cement.ext.ext_logging.LoggingLogHandler.error" title="Permalink to this definition">¶</a></dt>
<dd><p>Log to the ERROR facility.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>msg</strong> – The message to log.</li>
<li><strong>namespace</strong> – A log prefix, generally the module <code class="docutils literal"><span class="pre">__name__</span></code> that
the log is coming from. Will default to self._meta.namespace if
None is passed.</li>
<li><strong>kw</strong> – Keyword arguments are passed on to the backend logging
system.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="cement.ext.ext_logging.LoggingLogHandler.fatal">
<code class="descclassname">LoggingLogHandler.</code><code class="descname">fatal</code><span class="sig-paren">(</span><em>msg</em>, <em>namespace=None</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#cement.ext.ext_logging.LoggingLogHandler.fatal" title="Permalink to this definition">¶</a></dt>
<dd><p>Log to the FATAL (aka CRITICAL) facility.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>msg</strong> – The message to log.</li>
<li><strong>namespace</strong> – A log prefix, generally the module <code class="docutils literal"><span class="pre">__name__</span></code> that
the log is coming from. Will default to self._meta.namespace if
None is passed.</li>
<li><strong>kw</strong> – Keyword arguments are passed on to the backend logging
system.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="cement.ext.ext_logging.LoggingLogHandler.get_level">
<code class="descclassname">LoggingLogHandler.</code><code class="descname">get_level</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#cement.ext.ext_logging.LoggingLogHandler.get_level" title="Permalink to this definition">¶</a></dt>
<dd><p>Returns the current log level.</p>
</dd></dl>
<dl class="method">
<dt id="cement.ext.ext_logging.LoggingLogHandler.info">
<code class="descclassname">LoggingLogHandler.</code><code class="descname">info</code><span class="sig-paren">(</span><em>msg</em>, <em>namespace=None</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#cement.ext.ext_logging.LoggingLogHandler.info" title="Permalink to this definition">¶</a></dt>
<dd><p>Log to the INFO facility.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>msg</strong> – The message to log.</li>
<li><strong>namespace</strong> – A log prefix, generally the module <code class="docutils literal"><span class="pre">__name__</span></code> that
the log is coming from. Will default to self._meta.namespace if
None is passed.</li>
<li><strong>kw</strong> – Keyword arguments are passed on to the backend logging
system.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="cement.ext.ext_logging.LoggingLogHandler.set_level">
<code class="descclassname">LoggingLogHandler.</code><code class="descname">set_level</code><span class="sig-paren">(</span><em>level</em><span class="sig-paren">)</span><a class="headerlink" href="#cement.ext.ext_logging.LoggingLogHandler.set_level" title="Permalink to this definition">¶</a></dt>
<dd><p>Set the log level. Must be one of the log levels configured in
self.levels which are
<code class="docutils literal"><span class="pre">['INFO',</span> <span class="pre">'WARNING',</span> <span class="pre">'ERROR',</span> <span class="pre">'DEBUG',</span> <span class="pre">'FATAL']</span></code>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>level</strong> – The log level to set.</td>
</tr>
</tbody>
</table>
</dd></dl>
<dl class="method">
<dt id="cement.ext.ext_logging.LoggingLogHandler.warn">
<code class="descclassname">LoggingLogHandler.</code><code class="descname">warn</code><span class="sig-paren">(</span><em>msg</em>, <em>namespace=None</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#cement.ext.ext_logging.LoggingLogHandler.warn" title="Permalink to this definition">¶</a></dt>
<dd><p>DEPRECATION WARNING: This function is deprecated as of Cement 2.9.x
in favor of the <code class="docutils literal"><span class="pre">LoggingLogHandler.warning()</span></code> function, and will be
removed in future versions of Cement.</p>
<p>See: :ref:LoggingLogHandler.warning():</p>
</dd></dl>
<dl class="method">
<dt id="cement.ext.ext_logging.LoggingLogHandler.warning">
<code class="descclassname">LoggingLogHandler.</code><code class="descname">warning</code><span class="sig-paren">(</span><em>msg</em>, <em>namespace=None</em>, <em>**kw</em><span class="sig-paren">)</span><a class="headerlink" href="#cement.ext.ext_logging.LoggingLogHandler.warning" title="Permalink to this definition">¶</a></dt>
<dd><p>Log to the WARNING facility.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>msg</strong> – The message to log.</li>
<li><strong>namespace</strong> – A log prefix, generally the module <code class="docutils literal"><span class="pre">__name__</span></code> that
the log is coming from. Will default to self._meta.namespace if
None is passed.</li>
<li><strong>kw</strong> – Keyword arguments are passed on to the backend logging
system.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>
</dd></dl>
</div>
</div>
</div>
</div>
<footer>
<div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
<a href="ext_memcached.html" class="btn btn-neutral float-right" title="cement.ext.ext_memcached" accesskey="n">Next <span class="fa fa-arrow-circle-right"></span></a>
<a href="ext_json_configobj.html" class="btn btn-neutral" title="cement.ext.ext_json_configobj" accesskey="p"><span class="fa fa-arrow-circle-left"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>
© Copyright 2009-2016, Data Folk Labs, LLC.
</p>
</div>
Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../../',
VERSION:'2.10.0',
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../../_static/jquery.js"></script>
<script type="text/javascript" src="../../_static/underscore.js"></script>
<script type="text/javascript" src="../../_static/doctools.js"></script>
<script type="text/javascript" src="../../_static/js/theme.js"></script>
<script type="text/javascript">
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
</script>
</body>
</html>
|