<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 37: Documentation here - How to use the init file.</title><link href="https://sourceforge.net/p/log4cpp/support-requests/37/" rel="alternate"/><link href="https://sourceforge.net/p/log4cpp/support-requests/37/feed.atom" rel="self"/><id>https://sourceforge.net/p/log4cpp/support-requests/37/</id><updated>2013-06-06T23:29:08.745000Z</updated><subtitle>Recent changes to 37: Documentation here - How to use the init file.</subtitle><entry><title>#37 Documentation here - How to use the init file.</title><link href="https://sourceforge.net/p/log4cpp/support-requests/37/?limit=50#5fb8" rel="alternate"/><published>2013-06-06T23:29:08.745000Z</published><updated>2013-06-06T23:29:08.745000Z</updated><author><name>Craig McQueen</name><uri>https://sourceforge.net/u/cmcqueen1975/</uri></author><id>https://sourceforge.net9a1320f1aded7c058a1347e666fec2c2dbf3a72a</id><summary type="html">&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;</summary></entry><entry><title>Documentation here - How to use the init file.</title><link href="https://sourceforge.net/p/log4cpp/support-requests/37/" rel="alternate"/><published>2007-03-30T13:42:31Z</published><updated>2007-03-30T13:42:31Z</updated><author><name>pmdw</name><uri>https://sourceforge.net/u/pmdw/</uri></author><id>https://sourceforge.net49d9950577aeabd3291d16ee0234a8981e5d45ad</id><summary type="html">&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;</summary></entry></feed>