Somewhere in my startup sequence, I have something like :
contextBuilder.setLoggerManagerConfiguration
("resource://com/mycompany/container.xlog");
Here is the container.xlog file :
<logkit>
<factories>
<factory type="file" class
="org.apache.avalon.excalibur.logger.factory.FileTargetFactory"/>
<factory type="stream" class
="org.apache.avalon.excalibur.logger.factory.StreamTargetFactory"/>
</factories>
<targets>
<file id="root">
<filename>fortress-examples.log</filename>
<format type="extended">
%7.7{priority} %5.5{time} [%8.8{category}] (%{context}):
%{message}\n%{throwable}
</format>
</file>
<stream id="console">
<stream>System.out</stream>
<format type="avalon">%19.19{time:yyyy-MM- dd'T'HH:mm:ss.SSS}
%5.5{priority}[%-15.15{category}]: %{message}\n%{throwable}</format>
</stream>
</targets>
<categories>
<category name="components" log-level="DEBUG">
<log-target id-ref="root"/>
<log-target id-ref="console"/>
</category>
<category name="system.handlers" log-level="DEBUG">
<log-target id-ref="root"/>
</category>
</categories>
</logkit>
If I define a new category name "test" it won't do anything as the
categories seem to be prexixed by "test" :
test.test
test.components
test.system.handlers
The logger is correctly set up but i don't know how to override the
ContainerManager and ContextManager category (which outputs to
ConsoleLogger)
Gilles Philippart
Lending & Borrowing IT Team
Societe-Generale (www.socgen.com)
bloritsch@apache.
org To:
[EMAIL PROTECTED]
cc: (bcc: Gilles
PHILIPPART/eqty/fr/socgen)
30/07/02 15:34 Subject: RE: Disable Fortress internal
logging
Please respond to
avalon-users;
Please respond to
bloritsch
> From: [EMAIL PROTECTED]
>
> Hi i have a question about logging in Fortress :
>
> Is it possible to prevent Fortress internal logging to
> console ? In fact I would like to have only "my business"
> logs in the console. Can i do it declaratively in the xlog file ?
If you give the ContextBuilder a configuration for the
LoggerManager, or a concrete LoggerManager, the ContextManager
will initialize it so that it uses the
ContextManagerConstants.LOG_CATEGORY to determine the default logger
category for your Container.
It currently defaults to "test", but I am changing it to "fortress"
RSN. Your LogKitLoggerManager configuration URI should be bound to
ContextManagerConstants.LOGGER_MANAGER_CONFIGURATION_URI, or the
concrete Configuration to
ContextManagerConstants.LOGGER_MANAGER_CONFIGURATION.
Also, keep in mind that the ContainerManager and ContextManager
and friends default to the ConsoleLogger until the LoggerManager
is set up.
--
To unsubscribe, e-mail: <
mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <
mailto:[EMAIL PROTECTED]>
*************************************************************************
Ce message et toutes les pieces jointes (ci-apres le "message") sont
confidentiels et etablis a l'intention exclusive de ses destinataires.
Toute utilisation ou diffusion non autorisee est interdite.
Tout message electronique est susceptible d'alteration.
La SOCIETE GENERALE et ses filiales declinent toute responsabilite au
titre de ce message s'il a ete altere, deforme ou falsifie.
********
This message and any attachments (the "message") are confidential and
intended solely for the addressees.
Any unauthorised use or dissemination is prohibited.
E-mails are susceptible to alteration.
Neither SOCIETE GENERALE nor any of its subsidiaries or affiliates
shall be liable for the message if altered, changed or falsified.
*************************************************************************
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>