html/classes/Eymiha/EasyLog.html in eymiha_util-1.0.1 vs html/classes/Eymiha/EasyLog.html in eymiha_util-1.0.2
- old
+ new
@@ -1,246 +1,273 @@
-<?xml version="1.0" encoding="iso-8859-1"?>
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
- <title>Module: Eymiha::EasyLog</title>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <meta http-equiv="Content-Script-Type" content="text/javascript" />
- <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
- <script type="text/javascript">
- // <![CDATA[
-
- function popupCode( url ) {
- window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
- }
-
- function toggleCode( id ) {
- if ( document.getElementById )
- elem = document.getElementById( id );
- else if ( document.all )
- elem = eval( "document.all." + id );
- else
- return false;
-
- elemStyle = elem.style;
-
- if ( elemStyle.display != "block" ) {
- elemStyle.display = "block"
- } else {
- elemStyle.display = "none"
- }
-
- return true;
- }
-
- // Make codeblocks hidden by default
- document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
-
- // ]]>
- </script>
-
-</head>
-<body>
-
-
-
- <div id="classHeader">
- <table class="header-table">
- <tr class="top-aligned-row">
- <td><strong>Module</strong></td>
- <td class="class-name-in-header">Eymiha::EasyLog</td>
- </tr>
- <tr class="top-aligned-row">
- <td><strong>In:</strong></td>
- <td>
- <a href="../../files/lib/eymiha/util/easylog_rb.html">
- lib/eymiha/util/easylog.rb
- </a>
- <br />
- </td>
- </tr>
-
- </table>
- </div>
- <!-- banner header -->
-
- <div id="bodyContent">
-
-
-
- <div id="contextContent">
-
- <div id="description">
- <p>
-<a href="EasyLog.html">EasyLog</a> is a quick and convenient way to
-implement logging in Ruby code. By requiring the eymiha/util/easylog code,
-Easylog is included into module and is subsequently available to all
-classes.
-</p>
-<p>
-There is a natural flow to <a href="EasyLog.html">EasyLog</a> logging.
-First logging is started somewhere on high
-</p>
-<pre>
- start_logging filename
-</pre>
-<p>
-then messages are written to the log with the appropriate severity (here an
-informational message is logged)
-</p>
-<pre>
- log_info "something happened: #{foo}"
-</pre>
-<p>
-and optionally, when finished,
-</p>
-<pre>
- finish_logging
-</pre>
-<p>
-The upshot is that logging can be done from anywhere, and is as simple and
-easy as possible.
-</p>
-<p>
-The module builds five methods for <a href="EasyLog.html">EasyLog</a>
-logging corresponding to the five Logger severities: log_debug, log_info,
-log_warn, log_error and log_fatal. Their arguments are a message to be
-logged, and optionally one or more EasyLoggers that will be the targets of
-the message.
-</p>
-<p>
-Note that the classify attribute of an <a
-href="EasyLogger.html">EasyLogger</a> stores the decision about adding the
-class name to the end of the message or not; by default it is true and
-class names are added.
-</p>
-<pre>
- easylogger.classify = false
-</pre>
-<p>
-will turn this off.
-</p>
-
- </div>
-
-
- </div>
-
- <div id="method-list">
- <h3 class="section-bar">Methods</h3>
-
- <div class="name-list">
- <a href="#M000003">change_easylogger</a>
- <a href="#M000002">easylogger</a>
- <a href="#M000004">finish_logging</a>
- <a href="#M000001">start_logging</a>
- </div>
- </div>
-
- </div>
-
-
- <!-- if includes -->
-
- <div id="section">
-
-
-
-
-
-
-
-
- <!-- if method_list -->
- <div id="methods">
- <h3 class="section-bar">Public Instance methods</h3>
-
- <div id="method-M000003" class="method-detail">
- <a name="M000003"></a>
-
- <div class="method-heading">
- <a href="EasyLog.src/M000003.html" target="Code" class="method-signature"
- onclick="popupCode('EasyLog.src/M000003.html');return false;">
- <span class="method-name">change_easylogger</span><span class="method-args">(easylogger)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Changes the <a href="EasyLogger.html">EasyLogger</a> used for <a
-href="EasyLog.html">EasyLog</a> logging to the given <a
-href="EasyLogger.html">EasyLogger</a>.
-</p>
- </div>
- </div>
-
- <div id="method-M000002" class="method-detail">
- <a name="M000002"></a>
-
- <div class="method-heading">
- <a href="EasyLog.src/M000002.html" target="Code" class="method-signature"
- onclick="popupCode('EasyLog.src/M000002.html');return false;">
- <span class="method-name">easylogger</span><span class="method-args">()</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Returns the <a href="EasyLogger.html">EasyLogger</a> that is being used for
-<a href="EasyLog.html">EasyLog</a> logging.
-</p>
- </div>
- </div>
-
- <div id="method-M000004" class="method-detail">
- <a name="M000004"></a>
-
- <div class="method-heading">
- <a href="EasyLog.src/M000004.html" target="Code" class="method-signature"
- onclick="popupCode('EasyLog.src/M000004.html');return false;">
- <span class="method-name">finish_logging</span><span class="method-args">()</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Turns off <a href="EasyLog.html">EasyLog</a> logging until restarted.
-</p>
- </div>
- </div>
-
- <div id="method-M000001" class="method-detail">
- <a name="M000001"></a>
-
- <div class="method-heading">
- <a href="EasyLog.src/M000001.html" target="Code" class="method-signature"
- onclick="popupCode('EasyLog.src/M000001.html');return false;">
- <span class="method-name">start_logging</span><span class="method-args">(logdev, shift_age = 'weekly', shift_size = 1048576, subsecond_precision = nil)</span>
- </a>
- </div>
-
- <div class="method-description">
- <p>
-Creates a new <a href="EasyLogger.html">EasyLogger</a> instance with the
-given arguments, and uses it for all subsequent <a
-href="EasyLog.html">EasyLog</a> logging. The arguments are the same as used
-in <a href="EasyLogger.html">EasyLogger</a> creation.
-</p>
- </div>
- </div>
-
-
- </div>
-
-
- </div>
-
-
-<div id="validator-badges">
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
-</div>
-
-</body>
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Module: Eymiha::EasyLog</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+ <script type="text/javascript">
+ // <![CDATA[
+
+ function popupCode( url ) {
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+ }
+
+ function toggleCode( id ) {
+ if ( document.getElementById )
+ elem = document.getElementById( id );
+ else if ( document.all )
+ elem = eval( "document.all." + id );
+ else
+ return false;
+
+ elemStyle = elem.style;
+
+ if ( elemStyle.display != "block" ) {
+ elemStyle.display = "block"
+ } else {
+ elemStyle.display = "none"
+ }
+
+ return true;
+ }
+
+ // Make codeblocks hidden by default
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+
+ // ]]>
+ </script>
+
+</head>
+<body>
+
+
+
+ <div id="classHeader">
+ <table class="header-table">
+ <tr class="top-aligned-row">
+ <td><strong>Module</strong></td>
+ <td class="class-name-in-header">Eymiha::EasyLog</td>
+ </tr>
+ <tr class="top-aligned-row">
+ <td><strong>In:</strong></td>
+ <td>
+ <a href="../../files/lib/eymiha/util/easylog_rb.html">
+ lib/eymiha/util/easylog.rb
+ </a>
+ <br />
+ </td>
+ </tr>
+
+ </table>
+ </div>
+ <!-- banner header -->
+
+ <div id="bodyContent">
+
+
+
+ <div id="contextContent">
+
+ <div id="description">
+ <p>
+<a href="EasyLog.html">EasyLog</a> is a quick and convenient way to
+implement logging in Ruby code. By requiring the eymiha/util/easylog code,
+Easylog is included into module and is subsequently available to all
+classes.
+</p>
+<p>
+There is a natural flow to <a href="EasyLog.html">EasyLog</a> logging.
+First logging is started somewhere on high
+</p>
+<pre>
+ start_logging filename
+</pre>
+<p>
+then messages are written to the log with the appropriate severity (here an
+informational message is logged)
+</p>
+<pre>
+ log_info "something happened: #{foo}"
+</pre>
+<p>
+and optionally, when finished,
+</p>
+<pre>
+ finish_logging
+</pre>
+<p>
+The upshot is that logging can be done from anywhere, and is as simple and
+easy as possible.
+</p>
+<p>
+The module builds five methods for <a href="EasyLog.html">EasyLog</a>
+logging corresponding to the five Logger severities: log_debug, log_info,
+log_warn, log_error and log_fatal. Their arguments are a message to be
+logged, and optionally one or more EasyLoggers that will be the targets of
+the message.
+</p>
+<p>
+Note the classify attribute of an <a href="EasyLogger.html">EasyLogger</a>
+stores the decision about adding the class name to the end of the message
+or not; by default it is true and class names are added.
+</p>
+<pre>
+ easylogger.classify = false
+</pre>
+<p>
+will turn this off.
+</p>
+<p>
+Two other convenience methods for each of the five Logger severities are
+also provided for checking and adjusting <a href="EasyLog.html">EasyLog</a>
+threshold levels. The log_debug?, log_info?, log_warn?, log_error? and
+log_fatal? methods return true if a message at that level will be reported.
+Respectively, the log_level_debug, log_level_info, log_level_warn,
+log_level_error and log_level_fatal methods will set the threshold to pass
+only messages at or above the selected severity.
+</p>
+
+ </div>
+
+
+ </div>
+
+ <div id="method-list">
+ <h3 class="section-bar">Methods</h3>
+
+ <div class="name-list">
+ <a href="#M000003">change_easylogger</a>
+ <a href="#M000002">easylogger</a>
+ <a href="#M000004">finish_logging</a>
+ <a href="#M000005">log_level</a>
+ <a href="#M000001">start_logging</a>
+ </div>
+ </div>
+
+ </div>
+
+
+ <!-- if includes -->
+
+ <div id="section">
+
+
+
+
+
+
+
+
+ <!-- if method_list -->
+ <div id="methods">
+ <h3 class="section-bar">Public Instance methods</h3>
+
+ <div id="method-M000003" class="method-detail">
+ <a name="M000003"></a>
+
+ <div class="method-heading">
+ <a href="EasyLog.src/M000003.html" target="Code" class="method-signature"
+ onclick="popupCode('EasyLog.src/M000003.html');return false;">
+ <span class="method-name">change_easylogger</span><span class="method-args">(easylogger)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Changes the <a href="EasyLogger.html">EasyLogger</a> used for <a
+href="EasyLog.html">EasyLog</a> logging to the given <a
+href="EasyLogger.html">EasyLogger</a>.
+</p>
+ </div>
+ </div>
+
+ <div id="method-M000002" class="method-detail">
+ <a name="M000002"></a>
+
+ <div class="method-heading">
+ <a href="EasyLog.src/M000002.html" target="Code" class="method-signature"
+ onclick="popupCode('EasyLog.src/M000002.html');return false;">
+ <span class="method-name">easylogger</span><span class="method-args">()</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Returns the <a href="EasyLogger.html">EasyLogger</a> that is being used for
+<a href="EasyLog.html">EasyLog</a> logging.
+</p>
+ </div>
+ </div>
+
+ <div id="method-M000004" class="method-detail">
+ <a name="M000004"></a>
+
+ <div class="method-heading">
+ <a href="EasyLog.src/M000004.html" target="Code" class="method-signature"
+ onclick="popupCode('EasyLog.src/M000004.html');return false;">
+ <span class="method-name">finish_logging</span><span class="method-args">()</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Turns off <a href="EasyLog.html">EasyLog</a> logging until restarted.
+</p>
+ </div>
+ </div>
+
+ <div id="method-M000005" class="method-detail">
+ <a name="M000005"></a>
+
+ <div class="method-heading">
+ <a href="EasyLog.src/M000005.html" target="Code" class="method-signature"
+ onclick="popupCode('EasyLog.src/M000005.html');return false;">
+ <span class="method-name">log_level</span><span class="method-args">()</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Returns the threshold of the <a href="EasyLog.html">EasyLog</a>, or nil if
+no Easylogger is set.
+</p>
+ </div>
+ </div>
+
+ <div id="method-M000001" class="method-detail">
+ <a name="M000001"></a>
+
+ <div class="method-heading">
+ <a href="EasyLog.src/M000001.html" target="Code" class="method-signature"
+ onclick="popupCode('EasyLog.src/M000001.html');return false;">
+ <span class="method-name">start_logging</span><span class="method-args">(logdev, shift_age = 'weekly', shift_size = 1048576,
subsecond_precision = nil)</span>
+ </a>
+ </div>
+
+ <div class="method-description">
+ <p>
+Creates a new <a href="EasyLogger.html">EasyLogger</a> instance with the
+given arguments, and uses it for all subsequent <a
+href="EasyLog.html">EasyLog</a> logging. The arguments are the same as used
+in <a href="EasyLogger.html">EasyLogger</a> creation.
+</p>
+ </div>
+ </div>
+
+
+ </div>
+
+
+ </div>
+
+
+<div id="validator-badges">
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
</html>
\ No newline at end of file