Thanks! continuing ...
:> public void initialize() throws Exception {
:> DefaultConfigurationBuilder builder = new
:> DefaultConfigurationBuilder();
:> Configuration sysConfig = builder.buildFromFile(
:> "/home/hans/casopis/system.xml");
:>
:> this.manager.contextualize(new DefaultContext());
:> this.manager.configure(sysConfig);
:> this.manager.initialize();
:> }
:
:
:The ExcaliburComponentManager is Loggable, and the configure() method uses the
:logger that was supposed to be given to it.
:Before contextualize() you should have done this:
:this.manager.setLogger( getLogger() );
:Of course, that assumes you have already set up your LogKit Logger.
Now my container.initialize() looks like this:
(as in DwAA)
public void initialize() throws Exception {
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(Hierarchy.getDefaultHierarchy().getLoggerFor(
"/home/hans/casopis/document.roles"));
roles.configure(roleConfig);
this.manager.setLogger(Hierarchy.getDefaultHierarchy().
getLoggerFor("document"));
this.manager.contextualize(new DefaultContext());
this.manager.setRoleManager(roles);
this.manager.configure(sysConfig);
this.manager.initialize();
}
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?
Does this have something to do with the fact that I do
this.manager.setLogger(Hierarchy.getDefaultHierarchy().getLoggerFor("document"));
instead of
this.manager.setLogger( getLogger() );
?
Thanks again
Jan
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>