Josias Thöny wrote:
On Mon, 2006-03-13 at 19:46 +0100, Michael Wechner wrote:
Andreas Hartmann wrote:
Hi Michi,
thanks for your commits - but I have some comments:
+import org.apache.log4j.Category;
please don't introduce a custom logging concept for single classes.
DefaultDocument is already LogEnabled.
I know, but the current logging concept really sucks if I might say so.
If you are able to show how one can configure it in a better way, then I
am fine,
but the logging information as it is just doesn't help at all.
What I don't understand about the current logging is the logger names.
For example, the output of PublicationImpl belongs to the logger
"core.manager",
That's because the PublicationManager component isn't configured
in cocoon.xconf. You could add for instance
<component class="org.apache.lenya.cms.publication.PublicationManagerImpl"
role="org.apache.lenya.cms.publication.PublicationManager"
logger="lenya.publication"/>
Then the logger "lenya.publication" is used.
and the output of DefaultDocument belongs to
"lenya.publication" (at least that's what I see in log4j.log).
The DefaultDocumentBuilder has the lenya.publication logger:
<document-builders>
<component-instance
class="org.apache.lenya.cms.publication.DefaultDocumentBuilder"
logger="lenya.publication" name="default"/>
</document-builders>
It seems the names are associated to the avalon components, but it makes
it kinda difficult to filter the log output of a certain java class.
If we need finer logging granularity, we could replace
ContainerUtil.enableLogging(publication, getLogger());
with
ContainerUtil.enableLogging(publication, getLogger().getChildLogger(...));
IMO component-level granularity is sufficient in most cases, but
it's fine with me to change it.
-- Andreas
--
Andreas Hartmann
Wyona Inc. - Open Source Content Management - Apache Lenya
http://www.wyona.com http://lenya.apache.org
[EMAIL PROTECTED] [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]