I'm traveling right now, so it's just from the top of my head. But if the appender isn't used it might not retrieve an log event. So your appender might not be used by a logger.
Regards, Achim sent from mobile device Am 21.10.2014 09:00 schrieb "syedbahm" <syedb...@cisco.com>: > I tried remote debugging by putting karaf in debug + suspend mode and > connect from the other end running log4j flume appender code. The log4j > flume Appender class configured in org.ops4j.pax.logging.cfg as shown below > doesn't get called. > > --------------- > # Root logger > log4j.rootLogger = DEBUG, out, flume, osgi:* > > # flume appender > log4j.appender.flume=org.apache.flume.clients.log4jappender.Log4jAppender > log4j.appender.flume.Port=7070 > log4j.appender.flume.Hostname=<my lab setup ip> > log4j.appender.flume.layout=org.apache.log4j.PatternLayout > > ------------- > > When you mentioned it might be related to configuration -- can you further > provide details about which config you are doubting ? > > thx > -syed > > > > > > > On 10/20/2014 11:49 PM, Achim Nierbeck wrote: > > The good news, > Your setup is good as the list of bundles already shows the fragment > bundle to be attached to the right host bundle. > Does the appender require something special? Any certain classes from > log4j? > You could try to debug into the appender and try to see if it is actually > called. If not it's something in the configuration. > > Regards, Achim > > sent from mobile device > Am 21.10.2014 08:29 schrieb "syedbahm" <syedb...@cisco.com>: > >> The fragment seems to show as resolved -- so if it is working we should >> have seen it connecting to the hostname specified in the appender >> configuration -- which is not happening. How can I find out if its reaching >> the point of instantiating the appender specified class and actually trying >> to append any log. >> >> Details: >> >> bundle:list or la >> shows that the fragment host is resolved. >> --- >> 7 | Resolved | 7 | 1.0.0.SNAPSHOT | Flume NG Log4j Appender, >> Hosts: 9 >> 8 | Active | 8 | 1.7.2 | OPS4J Pax Logging - >> API >> 9 | Active | 8 | 1.7.2 | OPS4J Pax Logging - >> Service, Fragments: 76, 7 >> --- >> >> opendaylight-user@root>bundle:info 9 >> >> OPS4J Pax Logging - Service (9) >> ------------------------------- >> opendaylight-user@root>bundle:refresh 9 >> Error executing command: Access to system bundle 9 denied. You can >> override with -f >> opendaylight-user@root>bundle:refresh -f 9 >> opendaylight-user@root>bundle:info 9 >> >> OPS4J Pax Logging - Service (9) >> ------------------------------- >> opendaylight-user@root>bundle:refresh -f 7 >> opendaylight-user@root>bundle:info 7 >> >> Flume NG Log4j Appender (7) >> --------------------------- >> opendaylight-user@root>bundle:info 7 >> >> Flume NG Log4j Appender (7) >> --------------------------- >> opendaylight-user@root> >> >> >> >> On 10/20/2014 10:38 PM, Achim Nierbeck wrote: >> >> Hi >> Is the fragment bundle attached to the host bundle. You can tell by >> listing all bundles with la. The fragment bundle should be in resolved >> state. >> If you do a bundle: info on the host or fragment it should also tell you >> if the fragment is attached. >> If not try a refresh on the host bundle. >> >> Regards, Achim >> >> sent from mobile device >> Am 20.10.2014 23:20 schrieb "syedbahm" <syedb...@cisco.com>: >> >>> Forgot to mention >>> Please let me know what knobs can I turn on to further debug this >>> thing. >>> I tried remote debugging karaf with flume4jappender it looks like the >>> appender class is not called out at all. How can I further debug whats >>> happenning? >>> >>> >>> >>> -- >>> View this message in context: >>> http://karaf.922171.n3.nabble.com/Enabling-Flume-log4j-appender-logging-in-Karaf-tp4036033p4036035.html >>> Sent from the Karaf - User mailing list archive at Nabble.com. >>> >> >> >