Hi,
on the below log4j thread I have 2 questions. And then another on log4j
function currently in phoenix that doesn't seem to behave correctly.
1) is it now possible to use: SAR-INF/log4j.properties in the my SAR
file in the order specified and expect phoenix to pick it up? I
grepped the avalon-phoenix source for log4j.properties and didn't see
any references.
2) what is or would be the mechanism for this to work? Do I have to load
it log4j.properties specifically or it is automatic?
3) I am now using my environment.xml to define my log4j properties as
such:
<logs version="log4j">
<appender name="FILE" class="org.apache.log4j.FileAppender">
<param name="File" value="logs/mySarApp.log"/>
<param name="Append" value="false"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%c - %C{1}.%M() %p
%3x - %m%n"/>
</layout>
</appender>
<root>
<priority value="debug"/>
<appender-ref ref="FILE"/>
</root>
<logger name="MyClass">
<priority value="INFO"/>
</logger>
</logs>
I can not figure out how to specify the logger name for MyClass which is
the top level service provider ( vs. a component). Meaning that it
implements the enableLogging( Logger log). This results in phoenix
loader to pass in the logger which seems to be the block name. e.g.:
myblock == block name defined in the assembly.xml
MyClass == the implementing class defined in the assembly.xml
the log entries(logger element defined above in my enviornment.xml) in
mySarApp.log look like:
.myblock.MyClass - blah blah blah
(notice the "." prefixed )
so I tried to set the category threshhold value using:
<logger name=".myblock.MyClass">
<priority value="INFO"/>
</logger>
didn't work....
I tried:
<logger name="MyClass">
<priority value="INFO"/>
</logger>
didn't work
I continue to get the DEBUG levels output to log file which is the
default ROOT category.
help appreciated.
k.
On Sat, 2003-03-01 at 04:57, Peter Donald wrote:
> Hi,
>
> Ages ago (a year or two?) we decided that we wanted to separate out logging
> configuration from environment.xml - is this still desired? The reason is
> that I am currently documenting this and want to finalize the implementation
> prior to doccing it.
>
> The idea was to do something like
>
> SAR-INF/assembly.xml
> SAR-INF/config.xml
> SAR-INF/environment.xml
> SAR-INF/logging.xml
>
> and SAR-INF/logging.xml contains all the configuration for logging. I think it
> is just a case of no one getting around to doing it. This was just after
> Giacomo wrote the excalibur-logger package and we wanted to harmonize between
> Cocoon and Phoenix in this aspect.
>
> However I now have another motivation to do this. Several people have asked
> for support for log4j or native JDK1.4 logging configuration formats. So if
> we went the above way we could separate out logging we could search for
> configurations in the following order;
>
> SAR-INF/environment.xml (for backwards compatability)
> SAR-INF/logging.xml (excalibur logger)
> SAR-INF/log4j.xml (log4j xml format)
> SAR-INF/log4j.properties (log4j properties format)
> SAR-INF/log.properties (JDK1.4 format)
>
> That way people who want to use Log4j config files can do it easily.
>
> Thoughts?
>
> --
> Cheers,
>
> Peter Donald
> *-------------------------------------------------*
> | An eye for eye only ends up making the whole |
> | world blind. - Gandhi |
> *-------------------------------------------------*
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]