Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > b3a1f4d91c26f535919e39e25606614a > files > 1886

wt-doc-3.2.3-1.fc18.noarch.rpm

<!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">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Wt: Wt::WLogger Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Wt
   &#160;<span id="projectnumber">3.2.3</span>
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="inherits.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="namespaceWt.html">Wt</a>      </li>
      <li class="navelem"><a class="el" href="classWt_1_1WLogger.html">WLogger</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">Classes</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-attribs">Static Public Attributes</a> &#124;
<a href="#related">Related Functions</a>  </div>
  <div class="headertitle">
<div class="title">Wt::WLogger Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="Wt::WLogger" -->
<p>A simple logging class.  
 <a href="classWt_1_1WLogger.html#details">More...</a></p>

<p><code>#include &lt;Wt/WLogger&gt;</code></p>

<p><a href="classWt_1_1WLogger-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WLogger_1_1Field.html">Field</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Class that holds the configuration for a single field.  <a href="classWt_1_1WLogger_1_1Field.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structWt_1_1WLogger_1_1Sep.html">Sep</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Class that indicates a field separator.  <a href="structWt_1_1WLogger_1_1Sep.html#details">More...</a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structWt_1_1WLogger_1_1TimeStamp.html">TimeStamp</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Class that indicates a time stamp.  <a href="structWt_1_1WLogger_1_1TimeStamp.html#details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WLogger.html#aa2eef50d172fa9766e3500675c814535">WLogger</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new logger.  <a href="#aa2eef50d172fa9766e3500675c814535"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acb96bbbeede82e03a9489f0fb1c43e38"></a><!-- doxytag: member="Wt::WLogger::~WLogger" ref="acb96bbbeede82e03a9489f0fb1c43e38" args="()" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WLogger.html#acb96bbbeede82e03a9489f0fb1c43e38">~WLogger</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WLogger.html#ae851860f76c299bca96321b7d867a503">setStream</a> (std::ostream &amp;o)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the output stream.  <a href="#ae851860f76c299bca96321b7d867a503"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WLogger.html#a6d8a07bc92824fe32a123094e7516544">setFile</a> (const std::string &amp;path)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the output file.  <a href="#a6d8a07bc92824fe32a123094e7516544"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WLogger.html#a567c5b28fee703e37523898d30016f40">configure</a> (const std::string &amp;config)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Configures what things are logged.  <a href="#a567c5b28fee703e37523898d30016f40"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WLogger.html#a8287b40a0699797f63de2fe5deaaae9a">addField</a> (const std::string &amp;name, bool isString)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds a field.  <a href="#a8287b40a0699797f63de2fe5deaaae9a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="afbbcb96569a0296566d50c0cf1333c2c"></a><!-- doxytag: member="Wt::WLogger::fields" ref="afbbcb96569a0296566d50c0cf1333c2c" args="() const " -->
const std::vector&lt; <a class="el" href="classWt_1_1WLogger_1_1Field.html">Field</a> &gt; &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WLogger.html#afbbcb96569a0296566d50c0cf1333c2c">fields</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the field list. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1WLogEntry.html">WLogEntry</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WLogger.html#a317df898dd2f2dff667f95a714dfc4f2">entry</a> (const std::string &amp;type) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Starts a new log entry.  <a href="#a317df898dd2f2dff667f95a714dfc4f2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WLogger.html#af1b255165d3c3dde6bbee91f4794444b">logging</a> (const std::string &amp;type) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns whether messages of a given type are logged.  <a href="#af1b255165d3c3dde6bbee91f4794444b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WLogger.html#a177e7096c86fec4af9ca049f7d9a0b51">logging</a> (const std::string &amp;type, const std::string &amp;scope) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns whether messages of a given type and scope are logged.  <a href="#a177e7096c86fec4af9ca049f7d9a0b51"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="pub-static-attribs"></a>
Static Public Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="structWt_1_1WLogger_1_1Sep.html">Sep</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WLogger.html#ac368dcce6c4605855bce2807aad0d267">sep</a> = <a class="el" href="structWt_1_1WLogger_1_1Sep.html">WLogger::Sep</a>()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Field separator constant.  <a href="#ac368dcce6c4605855bce2807aad0d267"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static const <a class="el" href="structWt_1_1WLogger_1_1TimeStamp.html">TimeStamp</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WLogger.html#a96559cbf73a0d3647aeeac6d45bcc6b0">timestamp</a> = <a class="el" href="structWt_1_1WLogger_1_1TimeStamp.html">WLogger::TimeStamp</a>()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Timestamp field constant.  <a href="#a96559cbf73a0d3647aeeac6d45bcc6b0"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="related"></a>
Related Functions</h2></td></tr>
<tr><td class="ititle" colspan="2"><p>(Note that these are not member functions.) </p>
</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classWt_1_1WLogEntry.html">WLogEntry</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classWt_1_1WLogger.html#a0d505163b2293b1a852955ce9b54f66f">log</a> (const std::string &amp;type)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Logging function.  <a href="#a0d505163b2293b1a852955ce9b54f66f"></a><br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>A simple logging class. </p>
<p>This class logs events to a stream in a flexible way. It allows to create log files using the commonly used <a href="http://www.w3.org/Daemon/User/Config/Logging.html#common-logfile-format">Common Log Format</a> or <a href="http://httpd.apache.org/docs/1.3/logs.html#combined">Combined Log Format</a>, but provides a general way for logging entries that consists of a fixed number of fields.</p>
<p>It is used by Wt to create the application log (<a class="el" href="classWt_1_1WApplication.html#a75067771ba8fcc56e174f2e741ce278f" title="Adds an entry to the application log.">WApplication::log()</a>), and built-in httpd access log.</p>
<p>To use this class for custom logging, you should instantiate a logger, add one or more field definitions using <a class="el" href="classWt_1_1WLogger.html#a8287b40a0699797f63de2fe5deaaae9a" title="Adds a field.">addField()</a>, and set an output stream using <a class="el" href="classWt_1_1WLogger.html#ae851860f76c299bca96321b7d867a503" title="Sets the output stream.">setStream()</a> or <a class="el" href="classWt_1_1WLogger.html#a6d8a07bc92824fe32a123094e7516544" title="Sets the output file.">setFile()</a>. To stream data to the logger, use <a class="el" href="classWt_1_1WLogger.html#a317df898dd2f2dff667f95a714dfc4f2" title="Starts a new log entry.">entry()</a> to start formatting a new entry.</p>
<p>Usage example: </p>
<div class="fragment"><pre class="fragment"> <span class="comment">// Setup the logger</span>
 <a class="code" href="classWt_1_1WLogger.html" title="A simple logging class.">Wt::WLogger</a> logger;
 logger.<a class="code" href="classWt_1_1WLogger.html#a8287b40a0699797f63de2fe5deaaae9a" title="Adds a field.">addField</a>(<span class="stringliteral">&quot;datetime&quot;</span>, <span class="keyword">false</span>);
 logger.<a class="code" href="classWt_1_1WLogger.html#a8287b40a0699797f63de2fe5deaaae9a" title="Adds a field.">addField</a>(<span class="stringliteral">&quot;session&quot;</span>, <span class="keyword">false</span>);
 logger.<a class="code" href="classWt_1_1WLogger.html#a8287b40a0699797f63de2fe5deaaae9a" title="Adds a field.">addField</a>(<span class="stringliteral">&quot;type&quot;</span>, <span class="keyword">false</span>);
 logger.<a class="code" href="classWt_1_1WLogger.html#a8287b40a0699797f63de2fe5deaaae9a" title="Adds a field.">addField</a>(<span class="stringliteral">&quot;message&quot;</span>, <span class="keyword">true</span>);

 logger.<a class="code" href="classWt_1_1WLogger.html#a6d8a07bc92824fe32a123094e7516544" title="Sets the output file.">setFile</a>(<span class="stringliteral">&quot;/tmp/mylog.txt&quot;</span>);

 <span class="comment">// Add an entry</span>
 <a class="code" href="classWt_1_1WLogEntry.html" title="A stream-like object for creating an entry in a log file.">Wt::WLogEntry</a> <a class="code" href="classWt_1_1WLogger.html#a317df898dd2f2dff667f95a714dfc4f2" title="Starts a new log entry.">entry</a> = logger.<a class="code" href="classWt_1_1WLogger.html#a317df898dd2f2dff667f95a714dfc4f2" title="Starts a new log entry.">entry</a>();
 entry &lt;&lt; <a class="code" href="classWt_1_1WLogger.html#a96559cbf73a0d3647aeeac6d45bcc6b0" title="Timestamp field constant.">Wt::WLogger::timestamp</a> &lt;&lt; <a class="code" href="classWt_1_1WLogger.html#ac368dcce6c4605855bce2807aad0d267" title="Field separator constant.">Wt::WLogger::sep</a>
       &lt;&lt; <span class="charliteral">&#39;[&#39;</span> &lt;&lt; wApp-&gt;sessionId() &lt;&lt; <span class="charliteral">&#39;]&#39;</span> &lt;&lt; <a class="code" href="classWt_1_1WLogger.html#ac368dcce6c4605855bce2807aad0d267" title="Field separator constant.">Wt::WLogger::sep</a>
       &lt;&lt; <span class="charliteral">&#39;[&#39;</span> &lt;&lt; <span class="stringliteral">&quot;notice&quot;</span> &lt;&lt; <span class="charliteral">&#39;]&#39;</span> &lt;&lt; <a class="code" href="classWt_1_1WLogger.html#ac368dcce6c4605855bce2807aad0d267" title="Field separator constant.">Wt::WLogger::sep</a>
       &lt;&lt; <span class="stringliteral">&quot;Succesfully started.&quot;</span>;
</pre></div><dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WApplication.html#a75067771ba8fcc56e174f2e741ce278f" title="Adds an entry to the application log.">WApplication::log()</a> </dd></dl>
</div><hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="aa2eef50d172fa9766e3500675c814535"></a><!-- doxytag: member="Wt::WLogger::WLogger" ref="aa2eef50d172fa9766e3500675c814535" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Wt::WLogger::WLogger </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a new logger. </p>
<p>This creates a new logger, which defaults to logging to stderr. </p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a8287b40a0699797f63de2fe5deaaae9a"></a><!-- doxytag: member="Wt::WLogger::addField" ref="a8287b40a0699797f63de2fe5deaaae9a" args="(const std::string &amp;name, bool isString)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WLogger::addField </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>isString</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Adds a field. </p>
<p>Add a field to the logger. When <code>isString</code> is <code>true</code>, values will be quoted. </p>

</div>
</div>
<a class="anchor" id="a567c5b28fee703e37523898d30016f40"></a><!-- doxytag: member="Wt::WLogger::configure" ref="a567c5b28fee703e37523898d30016f40" args="(const std::string &amp;config)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WLogger::configure </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>config</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Configures what things are logged. </p>
<p>The configuration is a string that defines rules for enabling or disabling certain logging. It is a white-space delimited list of rules, and each rule is of the form:</p>
<ul>
<li><code>[-]level</code> : enables (or disables) logging of messages of the given level; '*' is a wild-card that matches all levels</li>
</ul>
<ul>
<li><code>[-]level:scope</code> : enables (or disables) logging of messages of the given level and scope; '*' is a wild-card that matches all levels or scopes.</li>
</ul>
<p>The default configuration is <code>"* -debug"</code>, i.e. by default everything is logged, except for "debug" messages.</p>
<p>Some other examples:</p>
<ul>
<li><code>"* -debug debug:wthttp"</code>: logs everything, including debugging messages of scope "wthttp", but no other debugging messages.</li>
</ul>
<ul>
<li><code>"* -info -debug"</code>: disables logging of info messages in addition to debugging messages.</li>
</ul>
<dl class="note"><dt><b>Note:</b></dt><dd>The standard logging is typically configured in the configuration file, in the &lt;log-config&gt; block. </dd></dl>

</div>
</div>
<a class="anchor" id="a317df898dd2f2dff667f95a714dfc4f2"></a><!-- doxytag: member="Wt::WLogger::entry" ref="a317df898dd2f2dff667f95a714dfc4f2" args="(const std::string &amp;type) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1WLogEntry.html">WLogEntry</a> Wt::WLogger::entry </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>type</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Starts a new log entry. </p>
<p>Returns a new entry. The entry is logged in the destructor of the entry (i.e. when the entry goes out of scope).</p>
<p>The <code>type</code> reflects a logging level. You can freely choose a type, but these are commonly used inside the library:</p>
<ul>
<li>"debug": debugging info (suppressed by default)</li>
<li>"info": informational notices</li>
<li>"warning": warnings (potentially wrong API use)</li>
<li>"secure": security-related events</li>
<li>"error": errors (wrong API use, unexpected protocol messages)</li>
<li>"fatal": fatal errors (terminate the session) </li>
</ul>

</div>
</div>
<a class="anchor" id="af1b255165d3c3dde6bbee91f4794444b"></a><!-- doxytag: member="Wt::WLogger::logging" ref="af1b255165d3c3dde6bbee91f4794444b" args="(const std::string &amp;type) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Wt::WLogger::logging </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>type</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns whether messages of a given type are logged. </p>
<p>Returns <code>true</code> if messages of the given type are logged. It may be that not messages of all scopes are logged.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WLogger.html#a567c5b28fee703e37523898d30016f40" title="Configures what things are logged.">configure()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a177e7096c86fec4af9ca049f7d9a0b51"></a><!-- doxytag: member="Wt::WLogger::logging" ref="a177e7096c86fec4af9ca049f7d9a0b51" args="(const std::string &amp;type, const std::string &amp;scope) const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool Wt::WLogger::logging </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>scope</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns whether messages of a given type and scope are logged. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WLogger.html#a567c5b28fee703e37523898d30016f40" title="Configures what things are logged.">configure()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a6d8a07bc92824fe32a123094e7516544"></a><!-- doxytag: member="Wt::WLogger::setFile" ref="a6d8a07bc92824fe32a123094e7516544" args="(const std::string &amp;path)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WLogger::setFile </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>path</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the output file. </p>
<p>Opens a file output stream for <code>path</code>. The default logger outputs to stderr.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WLogger.html#ae851860f76c299bca96321b7d867a503" title="Sets the output stream.">setStream()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ae851860f76c299bca96321b7d867a503"></a><!-- doxytag: member="Wt::WLogger::setStream" ref="ae851860f76c299bca96321b7d867a503" args="(std::ostream &amp;o)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Wt::WLogger::setStream </td>
          <td>(</td>
          <td class="paramtype">std::ostream &amp;&#160;</td>
          <td class="paramname"><em>o</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the output stream. </p>
<p>The default logger outputs to stderr.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WLogger.html#a6d8a07bc92824fe32a123094e7516544" title="Sets the output file.">setFile()</a> </dd></dl>

</div>
</div>
<hr/><h2>Friends And Related Function Documentation</h2>
<a class="anchor" id="a0d505163b2293b1a852955ce9b54f66f"></a><!-- doxytag: member="Wt::WLogger::log" ref="a0d505163b2293b1a852955ce9b54f66f" args="(const std::string &amp;type)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classWt_1_1WLogEntry.html">WLogEntry</a> log </td>
          <td>(</td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>type</em></td><td>)</td>
          <td><code> [related]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Logging function. </p>
<p>This creates a new log entry, e.g.:</p>
<div class="fragment"><pre class="fragment"> <a class="code" href="classWt_1_1WLogger.html#a0d505163b2293b1a852955ce9b54f66f" title="Logging function.">Wt::log</a>(<span class="stringliteral">&quot;info&quot;</span>) &lt;&lt; <span class="stringliteral">&quot;Doing something interesting now with &quot;</span> &lt;&lt; appleCount() &lt;&lt; <span class="stringliteral">&quot; apples.&quot;</span>;
</pre></div> 
</div>
</div>
<hr/><h2>Member Data Documentation</h2>
<a class="anchor" id="ac368dcce6c4605855bce2807aad0d267"></a><!-- doxytag: member="Wt::WLogger::sep" ref="ac368dcce6c4605855bce2807aad0d267" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="structWt_1_1WLogger_1_1Sep.html">WLogger::Sep</a> <a class="el" href="classWt_1_1WLogger.html#ac368dcce6c4605855bce2807aad0d267">Wt::WLogger::sep</a> = <a class="el" href="structWt_1_1WLogger_1_1Sep.html">WLogger::Sep</a>()<code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Field separator constant. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WLogEntry.html#af8046b0ecb69a59ae7beb9c45996f2a3" title="Writes a field separator.">WLogEntry::operator&lt;&lt;(const WLogger::Sep&amp;)</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a96559cbf73a0d3647aeeac6d45bcc6b0"></a><!-- doxytag: member="Wt::WLogger::timestamp" ref="a96559cbf73a0d3647aeeac6d45bcc6b0" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="structWt_1_1WLogger_1_1TimeStamp.html">WLogger::TimeStamp</a> <a class="el" href="classWt_1_1WLogger.html#a96559cbf73a0d3647aeeac6d45bcc6b0">Wt::WLogger::timestamp</a> = <a class="el" href="structWt_1_1WLogger_1_1TimeStamp.html">WLogger::TimeStamp</a>()<code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Timestamp field constant. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classWt_1_1WLogEntry.html#aba127b67d182be2f88d292dd65706faf" title="Writes a time stamp in the current field.">WLogEntry::operator&lt;&lt;(const WLogger::TimeStamp&amp;)</a> </dd></dl>

</div>
</div>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a></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>

<hr size="1"><address style="text-align: right; margin: 3px"><small>
Generated on Thu Nov 1 2012 for <a href="http://www.webtoolkit.eu/wt">the
C++ Web Toolkit (Wt)</a> by&nbsp;<a
href="http://www.doxygen.org/index.html"><img src="doxygen.png"
alt="doxygen" border="0" style="vertical-align: middle; display:
inline-block; height: 2em"></a> 1.7.5.1</small></address>
</body>
</html>