David of Sweden wrote: > > Gert Vanthienen wrote: > >>David, >> >>If you are building your own components, you can extends >>DefaultComponent which has a logger preconfigured. Most people aren't >>building their own JBI component though, they are using our components >>and e.g. adding POJOs to the servicemix-bean component. For those too, >>we have convenience base classes (like >>org.apache.servicemix.bean.support.BeanSupport) which have the logger >>preconfigured. >> > > > > hi and thankt, > > yes, I am building my own BC. At any rate I really need more control than to > just use the logger of the component. I want different loggers for different > purposes. I just want to create a logger for a specific class from scratch. > Further I'm confused about that the "logger" member variable of the > component is of a class org.apache.commons.logging.Log, not the log4j class > org.apache.log4j.Logger. What's the difference between these? log4j is the implementation and commons logging a wrapper. So by default log4j is the logger behind the commons logging in servicemix.
Log logger = LogFactory.getLog(YourClass.class); is one way to obtain the logger. If you want your logger to log in another file or whatever you should prepare the conf/log4j.xml which is possible at runtime. > Right now I'm trying out things like > LogManager.getLogger(this.getClass()); > But I don't quite get it to do what I want. What is it? > > //David Cheers, -- Thomas Termin _______________________________ blue elephant systems GmbH Wollgrasweg 49 D-70599 Stuttgart Tel : (+49) 0711 - 45 10 17 676 Fax : (+49) 0711 - 45 10 17 573 WWW : http://www.blue-elephant-systems.com Email : [EMAIL PROTECTED] blue elephant systems GmbH Firmensitz : Wollgrasweg 49, D-70599 Stuttgart Registergericht : Amtsgericht Stuttgart, HRB 24106 Geschäftsführer : Holger Dietrich, Thomas Gentsch, Joachim Hoernle
