You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by rsmaoui <s-...@hotmail.com> on 2012/08/09 15:03:36 UTC

Re: my own appender

Hi Freeman, 

I try also to create my own appender, so i added my configuration into
$SMX$_HOME/etc/org.ops4j.pax.logging.cfg file
 

       # Root logger
       log4j.rootLogger=INFO, out, osgi:VmLogAppender, SYSLOG

       # SysLog appender
       log4j.appender.SYSLOG=org.apache.log4j.net.SyslogAppender
       log4j.appender.SYSLOG.SyslogHost=localhost
       log4j.appender.SYSLOG.threshold=info
       log4j.appender.SYSLOG.Facility=LOCAL1
       log4j.appender.SYSLOG.layout=org.apache.log4j.PatternLayout
       log4j.appender.SYSLOG.layout.ConversionPattern=%d{ABSOLUTE} - [%-5p]
%c %x %m%n

With this configuration, logs should be redirected to the file
/var/log/messages but in my case there is not changed!!!
there is another configuration must be added to create my own appender



--
View this message in context: http://servicemix.396122.n5.nabble.com/my-own-appender-tp4560759p5714113.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.

Re: my own appender

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

Take a look at [1], the "Using your own appender" chapter, to get details how to use your own appender(The fragment  bundle way).

Or you can use OSGI service way to register your own appender, take a look at Charles's recent commit here[2]

[1]http://karaf.apache.org/manual/latest-2.2.x/users-guide/logging-system.html
[2]https://issues.apache.org/jira/browse/SMX4-1205

Freeman
-------------
Freeman Fang

FuseSource
Email:ffang@fusesource.com
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
http://blog.sina.com.cn/u/1473905042
weibo: http://weibo.com/u/1473905042

On 2012-8-9, at 下午9:03, rsmaoui wrote:

> Hi Freeman, 
> 
> I try also to create my own appender, so i added my configuration into
> $SMX$_HOME/etc/org.ops4j.pax.logging.cfg file
> 
> 
>       # Root logger
>       log4j.rootLogger=INFO, out, osgi:VmLogAppender, SYSLOG
> 
>       # SysLog appender
>       log4j.appender.SYSLOG=org.apache.log4j.net.SyslogAppender
>       log4j.appender.SYSLOG.SyslogHost=localhost
>       log4j.appender.SYSLOG.threshold=info
>       log4j.appender.SYSLOG.Facility=LOCAL1
>       log4j.appender.SYSLOG.layout=org.apache.log4j.PatternLayout
>       log4j.appender.SYSLOG.layout.ConversionPattern=%d{ABSOLUTE} - [%-5p]
> %c %x %m%n
> 
> With this configuration, logs should be redirected to the file
> /var/log/messages but in my case there is not changed!!!
> there is another configuration must be added to create my own appender
> 
> 
> 
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/my-own-appender-tp4560759p5714113.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.