Jan Stary wrote: > Thanks! continuing ... > <snip/>
> but when compiling it says > > > [javac] /home/hans/casopis/src/org/apache/bizserver/docs/ContainerComponent.java:25: >cannot resolve symbol > [javac] symbol : method enableLogging (org.apache.log.Logger) > [javac] location: class org.apache.avalon.excalibur.component.DefaultRoleManager > [javac] >roles.enableLogging(Hierarchy.getDefaultHierarchy().getLoggerFor( > [javac] ^ > [javac] 1 error > > > I suppose I don't "have already set up my LogKit Logger" - how do I do that, > please? Avalon Framework is migrating to the LogEnabled interface with the Logger abstraction. That way, you are not bound to any one Logging package, and as you logging needs change, you can still build your project with Avalon. Because ExcaliburComponentManager must remain backwards compatible, it must use the legacy Loggable interface. The RoleManager is LogEnabled, and now that I think about it, it was premature to move that just yet. For LogEnabled classes, you would wrap the logging package logger with one of the wrappers supplied in Avalon. That means your code for your example would be like this: public void initialize() throws Exception { org.apache.log.Logger logger = Hierarchy.getDefaultHierarchy(). getLoggerFor("document"); DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder(); Configuration sysConfig = builder.buildFromFile( "/home/hans/casopis/system.xml"); Configuration roleConfig = builder.build(this.getClass().getClassLoader().getResourceAsStream( "/home/hans/casopis/document.roles")); DefaultRoleManager roles = new DefaultRoleManager(); roles.enableLogging(new LogKitLogger( logger )); roles.configure(roleConfig); this.manager.setLogger(logger); this.manager.contextualize(new DefaultContext()); this.manager.setRoleManager(roles); this.manager.configure(sysConfig); this.manager.initialize(); } I am working on a replacement that is LogEnabled clean so there is no mixture. -- "They that give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." - Benjamin Franklin -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>