blob: 4bf241c9b2fafc1a27ec2390adec05c32e4572c2 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
--><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Apache log4cxx: ConsoleAppender Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.6 -->
<div class="tabs">
<ul>
<li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li id="current"><a href="classes.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul></div>
<div class="tabs">
<ul>
<li><a href="classes.html"><span>Alphabetical&nbsp;List</span></a></li>
<li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
<li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
</ul></div>
<div class="nav">
<a class="el" href="namespacelog4cxx.html">log4cxx</a>::<a class="el" href="classlog4cxx_1_1_console_appender.html">ConsoleAppender</a></div>
<h1>ConsoleAppender Class Reference</h1><!-- doxytag: class="log4cxx::ConsoleAppender" --><!-- doxytag: inherits="log4cxx::WriterAppender" -->Inherits <a class="el" href="classlog4cxx_1_1_writer_appender.html">WriterAppender</a>.
<p>
<a href="classlog4cxx_1_1_console_appender-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>
<a class="el" href="classlog4cxx_1_1_console_appender.html">ConsoleAppender</a> appends log events to <code>stdout</code> or <code>stderr</code> using a layout specified by the user.
<p>
The default target is <code>stdout</code>.
<p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_console_appender.html#0ee49cfd642ce6a092fd7999b25ab709">ConsoleAppender</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_console_appender.html#2437f270bf878798702b1f134993be88">ConsoleAppender</a> (const <a class="el" href="classlog4cxx_1_1helpers_1_1_object_ptr_t.html">LayoutPtr</a> &amp;<a class="el" href="classlog4cxx_1_1_appender_skeleton.html#f1f4e6a2229d95a18324c4e7fa71be65">layout</a>)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_console_appender.html#e2c15e71f1f169a933c46e4982aa3649">ConsoleAppender</a> (const <a class="el" href="classlog4cxx_1_1helpers_1_1_object_ptr_t.html">LayoutPtr</a> &amp;<a class="el" href="classlog4cxx_1_1_appender_skeleton.html#f1f4e6a2229d95a18324c4e7fa71be65">layout</a>, const <a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;target)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_console_appender.html#088f62e98648209fdc07fd2ede8d18eb">~ConsoleAppender</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_console_appender.html#f52ebb79def0f65a7d4102409a8db930">setTarget</a> (const <a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;value)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets the value of the <b>target</b> property. <a href="#f52ebb79def0f65a7d4102409a8db930"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_console_appender.html#f3f6329074e47d2e03c23b96b5bc1525">getTarget</a> () const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the current value of the <b>target</b> property. <a href="#f3f6329074e47d2e03c23b96b5bc1525"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_console_appender.html#a3df68f8aae152299471992071e202f5">activateOptions</a> (<a class="el" href="classlog4cxx_1_1helpers_1_1_pool.html">log4cxx::helpers::Pool</a> &amp;p)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Derived appenders should override this method if option structure requires it. <a href="#a3df68f8aae152299471992071e202f5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_console_appender.html#c1d269357907e0809687a2bec962e1c8">setOption</a> (const <a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;option, const <a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;value)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set <code>option</code> to <code>value</code>. <a href="#c1d269357907e0809687a2bec962e1c8"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static const <a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_console_appender.html#a36a1e41502db86d6883c896205086e4">getSystemOut</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">static const <a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classlog4cxx_1_1_console_appender.html#9b430899bd8f2fffff9226f6e763c337">getSystemErr</a> ()</td></tr>
</table>
<hr><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" name="0ee49cfd642ce6a092fd7999b25ab709"></a><!-- doxytag: member="log4cxx::ConsoleAppender::ConsoleAppender" ref="0ee49cfd642ce6a092fd7999b25ab709" args="()" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"><a class="el" href="classlog4cxx_1_1_console_appender.html">ConsoleAppender</a> </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<a class="anchor" name="2437f270bf878798702b1f134993be88"></a><!-- doxytag: member="log4cxx::ConsoleAppender::ConsoleAppender" ref="2437f270bf878798702b1f134993be88" args="(const LayoutPtr &amp;layout)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"><a class="el" href="classlog4cxx_1_1_console_appender.html">ConsoleAppender</a> </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const <a class="el" href="classlog4cxx_1_1helpers_1_1_object_ptr_t.html">LayoutPtr</a> &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>layout</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<a class="anchor" name="e2c15e71f1f169a933c46e4982aa3649"></a><!-- doxytag: member="log4cxx::ConsoleAppender::ConsoleAppender" ref="e2c15e71f1f169a933c46e4982aa3649" args="(const LayoutPtr &amp;layout, const LogString &amp;target)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"><a class="el" href="classlog4cxx_1_1_console_appender.html">ConsoleAppender</a> </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const <a class="el" href="classlog4cxx_1_1helpers_1_1_object_ptr_t.html">LayoutPtr</a> &amp;&nbsp;</td>
<td class="mdname" nowrap> <em>layout</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>const <a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;&nbsp;</td>
<td class="mdname" nowrap> <em>target</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<a class="anchor" name="088f62e98648209fdc07fd2ede8d18eb"></a><!-- doxytag: member="log4cxx::ConsoleAppender::~ConsoleAppender" ref="088f62e98648209fdc07fd2ede8d18eb" args="()" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">~<a class="el" href="classlog4cxx_1_1_console_appender.html">ConsoleAppender</a> </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a3df68f8aae152299471992071e202f5"></a><!-- doxytag: member="log4cxx::ConsoleAppender::activateOptions" ref="a3df68f8aae152299471992071e202f5" args="(log4cxx::helpers::Pool &amp;p)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void activateOptions </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="classlog4cxx_1_1helpers_1_1_pool.html">log4cxx::helpers::Pool</a> &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>p</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Derived appenders should override this method if option structure requires it.
<p>
<p>
Reimplemented from <a class="el" href="classlog4cxx_1_1_writer_appender.html#9fe8531491720e83f1d25862d918a37d">WriterAppender</a>. </td>
</tr>
</table>
<a class="anchor" name="9b430899bd8f2fffff9226f6e763c337"></a><!-- doxytag: member="log4cxx::ConsoleAppender::getSystemErr" ref="9b430899bd8f2fffff9226f6e763c337" args="()" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">static const <a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a>&amp; getSystemErr </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<a class="anchor" name="a36a1e41502db86d6883c896205086e4"></a><!-- doxytag: member="log4cxx::ConsoleAppender::getSystemOut" ref="a36a1e41502db86d6883c896205086e4" args="()" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">static const <a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a>&amp; getSystemOut </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [static]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
</td>
</tr>
</table>
<a class="anchor" name="f3f6329074e47d2e03c23b96b5bc1525"></a><!-- doxytag: member="log4cxx::ConsoleAppender::getTarget" ref="f3f6329074e47d2e03c23b96b5bc1525" args="() const " --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top"><a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a> getTarget </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Returns the current value of the <b>target</b> property.
<p>
The default value of the option is "System.out".<p>
See also <a class="el" href="classlog4cxx_1_1_console_appender.html#f52ebb79def0f65a7d4102409a8db930">setTarget</a>. </td>
</tr>
</table>
<a class="anchor" name="c1d269357907e0809687a2bec962e1c8"></a><!-- doxytag: member="log4cxx::ConsoleAppender::setOption" ref="c1d269357907e0809687a2bec962e1c8" args="(const LogString &amp;option, const LogString &amp;value)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void setOption </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const <a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;&nbsp;</td>
<td class="mdname" nowrap> <em>option</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>const <a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;&nbsp;</td>
<td class="mdname" nowrap> <em>value</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Set <code>option</code> to <code>value</code>.
<p>
The handling of each option depends on the OptionHandler instance. Some options may become active immediately whereas other may be activated only when <a class="el" href="classlog4cxx_1_1_console_appender.html#a3df68f8aae152299471992071e202f5">activateOptions</a> is called.
<p>
Reimplemented from <a class="el" href="classlog4cxx_1_1_writer_appender.html#c1d269357907e0809687a2bec962e1c8">WriterAppender</a>. </td>
</tr>
</table>
<a class="anchor" name="f52ebb79def0f65a7d4102409a8db930"></a><!-- doxytag: member="log4cxx::ConsoleAppender::setTarget" ref="f52ebb79def0f65a7d4102409a8db930" args="(const LogString &amp;value)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void setTarget </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const <a class="el" href="namespacelog4cxx.html#d7ec98d27bca7666e23f27dd1fb181c8">LogString</a> &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>value</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Sets the value of the <b>target</b> property.
<p>
Recognized values are "System.out" and "System.err". Any other value will be ignored. </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="consoleappender_8h.html">consoleappender.h</a></ul>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
</BODY>
</HTML>