On Mon, 14 Jan 2002 18:15:19 +0100 Jan Stary wrote:
> On Jan 11 09:53:49, Berin Loritsch wrote:
> :Jan Stary wrote:
> :
> :> :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();
> :> :}
> :>
> :> Well ... this doesn't compile (cannot resolve symbol LogKitLogger)
> :> - looking into org/apache/log, there is really no LogKitLogger,
> :> and it doesn't compile with 'new LogKit(logger)' neither
> :>
> :> It logkit.jar that comes vith excalibur 4.0b4
> :
> :
> :Try org.apache.avalon.framework.logger.LogKitLogger
> :That is where the new Logger abstraction stuff is.
> :
>
> I upgraded to all the most recent versions, but anyway, there is no
> enableLogging method in class DefaultRoleMAnager (which is what roles
> is an instance of)...
>
> Am I doing something wrong?
DefaultRoleManager is Loggable in the CVS. It's not yet LogEnabled.
Maybe Berin has modified it but not yet checked in. You will have to
change the line after the creation of DefaultRoleManager to:
roles.setLogger(logger);
Cheers,
Jeremias M�rki
mailto:[EMAIL PROTECTED]
OUTLINE AG
Postfach 3954 - Rhynauerstr. 15 - CH-6002 Luzern
Fon +41 (41) 317 2020 - Fax +41 (41) 317 2029
Internet http://www.outline.ch
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>