<p>Can some one post an example of using syslog outputter for log4r, I am currently using stdout but want to log to syslog.</p>

<pre><code>mylog = Logger.new 'mylog'
mylog.outputters = Outputter.stdout
mylog.info "Starting up."
</code></pre>

<p>raj</p>

<hr>

<p>Thanks also to the following blog posts.<br> </p>

<p><a href="http://angrez.blogspot.com/2006/12/log4r-usage-and-examples.html" rel="nofollow noreferrer">Angrez's blog: Log4r - Usage and Examples</a></p>

<p><a href="http://programmingstuff.wikidot.com/log4r" rel="nofollow noreferrer">ProgrammingStuff: Log4r</a></p>

Kind of lame answering my own question, but I found answer to this and adding it for later searches.
For some reason I need to require log4r/outputter/syslogoutputter explicitly other wise SyslogOutputter would cause "uninitialized constant SyslogOutputter (NameError)" error. Other outputters do not seem to have this problem.
```
```
require 'rubygems'
require 'log4r'
require 'log4r/outputter/syslogoutputter'
mylog = Logger.new 'mylog'
mylog.outputters = SyslogOutputter.new("f1", :ident => "myscript")
mylog.info "Starting up."
```
```
raj