<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 37: Documentation here - How to use the init file.</title><link>https://sourceforge.net/p/log4cpp/support-requests/37/</link><description>Recent changes to 37: Documentation here - How to use the init file.</description><atom:link href="https://sourceforge.net/p/log4cpp/support-requests/37/feed.rss" rel="self"/><language>en</language><lastBuildDate>Thu, 06 Jun 2013 23:29:08 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/log4cpp/support-requests/37/feed.rss" rel="self" type="application/rss+xml"/><item><title>#37 Documentation here - How to use the init file.</title><link>https://sourceforge.net/p/log4cpp/support-requests/37/?limit=50#5fb8</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I found it necessary to look in the source code (e.g. &lt;a class="" href="https://github.com/ietjxdl/log4cpp/blob/master/src/PropertyConfiguratorImpl.cpp" rel="nofollow"&gt;here&lt;/a&gt; from a code fork) to figure out its usage.&lt;/p&gt;
&lt;p&gt;For example, I had to look there to figure out that to log to syslog, I needed to specify appender &lt;code&gt;LocalSyslogAppender&lt;/code&gt;. And I had to look there to find out that there's no way to make it log to console &lt;code&gt;STDERR&lt;/code&gt; (there's only &lt;code&gt;ConsoleAppender&lt;/code&gt; which logs to &lt;code&gt;STDOUT&lt;/code&gt;).&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Craig McQueen</dc:creator><pubDate>Thu, 06 Jun 2013 23:29:08 -0000</pubDate><guid>https://sourceforge.net9a1320f1aded7c058a1347e666fec2c2dbf3a72a</guid></item><item><title>Documentation here - How to use the init file.</title><link>https://sourceforge.net/p/log4cpp/support-requests/37/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;I can't create a user on the wiki to add this.&lt;br /&gt;
I am sure it will be of some use to someone if it could be added to the wiki or in the doc some where&lt;/p&gt;
&lt;p&gt;When using the Simple Configuration options in the&lt;br /&gt;
log4cpp.init file this may help users configuring the&lt;br /&gt;
log file&lt;/p&gt;
&lt;p&gt;Command syntax as follows:&lt;br /&gt;
Each command is on entire line and is case sensitive&lt;br /&gt;
&amp;lt;command&amp;gt; &amp;lt;category name&amp;gt; &amp;lt;layout type&amp;gt; &amp;lt;appender commands&amp;gt; &amp;lt;layout patterns&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;command&amp;gt;&lt;br /&gt;
valid commands are&lt;br /&gt;
- appender&lt;br /&gt;
- priority&lt;br /&gt;
- category&lt;/p&gt;
&lt;p&gt;&amp;lt;category name&amp;gt;&lt;br /&gt;
valid category name are&lt;br /&gt;
- root&lt;br /&gt;
- &amp;lt;user defined category in application&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;layout type&amp;gt;&lt;br /&gt;
valid layout types are&lt;br /&gt;
- basic&lt;br /&gt;
- simple&lt;br /&gt;
- pattern&lt;/p&gt;
&lt;p&gt;&amp;lt;appender commands&amp;gt;&lt;br /&gt;
valid appender commands are&lt;br /&gt;
- file    &amp;lt;followed by a log file name&amp;gt;&lt;br /&gt;
- rolling &amp;lt;followed by a log file name&amp;gt;&lt;br /&gt;
&amp;lt;the max size of the file&amp;gt;&lt;br /&gt;
&amp;lt;and the max number of files to keep&amp;gt;&lt;br /&gt;
- console&lt;br /&gt;
- stdout&lt;br /&gt;
- stderr&lt;br /&gt;
- nteventlog &amp;lt;category name&amp;gt;&lt;br /&gt;
- syslog &amp;lt;category name&amp;gt;&lt;br /&gt;
- remotesyslog &amp;lt;category name&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;layout patterns&amp;gt;&lt;br /&gt;
The simple layout follows this pattern&lt;/p&gt;
&lt;p&gt;%p - %m%n&lt;/p&gt;
&lt;p&gt;The basic layout follows this pattern&lt;/p&gt;
&lt;p&gt;%R %p %c %x: %m%n&lt;/p&gt;
&lt;p&gt;Valid commands for pattern layout.&lt;br /&gt;
all commands for pattern are prefixed with %&lt;br /&gt;
all commands for pattern are case sensative&lt;/p&gt;
&lt;p&gt;- %n = create new line ( this is usually at the end to make a new line break&lt;/p&gt;
&lt;p&gt;- %m = Place the message here&lt;/p&gt;
&lt;p&gt;- %c = Place the category name here&lt;/p&gt;
&lt;p&gt;- %d = Place the date time stamp here&lt;/p&gt;
&lt;p&gt;- %p = Place the message priority here&lt;/p&gt;
&lt;p&gt;- %t = Place the thread name here&lt;/p&gt;
&lt;p&gt;- %u = Place the processing  time component here.&lt;/p&gt;
&lt;p&gt;- %x = Place the Nested Diagnostic Context (NDC) here.&lt;br /&gt;
NDC is an instrument to distinguish interleaved log output from&lt;br /&gt;
different sources.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">pmdw</dc:creator><pubDate>Fri, 30 Mar 2007 13:42:31 -0000</pubDate><guid>https://sourceforge.net49d9950577aeabd3291d16ee0234a8981e5d45ad</guid></item></channel></rss>