logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Rossi <s...@electroteque.org>
Subject Re: log4j alpha
Date Mon, 03 Sep 2007 05:51:52 GMT
Hi thanks i reverted to 1.2 with the extras however im now getting  
these errors,

log4j:WARN Continuable parsing error 58 and column 76
log4j:WARN Element type "rollingPolicy" must be declared.
log4j:WARN Continuable parsing error 72 and column 16
log4j:WARN The content of element type "appender" must match  
"(errorHandler?,param*,layout?,filter*,appender-ref*)".
log4j:WARN Continuable parsing error 74 and column 71
log4j:WARN Attribute "class" must be declared for element type "logger".
log4j:WARN Continuable parsing error 83 and column 23
log4j:WARN The content of element type "log4j:configuration" must  
match "(renderer*,appender*,(category|logger)*,root?,categoryFactory?)".
log4j:WARN Please set a rolling policy for the RollingFileAppender  
named 'TS000011-APP'

and the xml looks like

<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j='http://jakarta.apache.org/log4j/'>
appender name="TS000011-APP"  
class="org.apache.log4j.rolling.RollingFileAppender">
   		<rollingPolicy  
class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
   			<param name="fileNamePattern" value="logs/stats/TS000011/Red5_%d 
{yyyyMMdd}.log"/>
   		</rollingPolicy>

         <layout class="org.red5.server.logging.W3CLayout">
             <!--
             <param name="Fields"
                 value="field1,field2,field3"/>
                 -->
                 <!--
             <param name="Delimiter"
                 value="\t"/>
                 -->
         </layout>
     </appender>

     <logger name="TS000011" class="org.red5.server.logging.W3CLogger">
     	
     	<level value="PLAYBACKSTOP#org.red5.server.logging.W3CLevel"/>

         <appender-ref ref="TS000011-APP"/>
     </logger>
<!-- End Logger For Stream Point TS000010  -->


</log4j:configuration>



On 03/09/2007, at 3:17 PM, Curt Arnold wrote:

>
> On Sep 2, 2007, at 11:00 PM, Daniel Rossi wrote:
>
>> Hi there, ive been developing upon log4j alpha 1.3 for quite a  
>> while to use some new features. I believe it is now a dead branch.  
>> What am i suppose to be using, I need the new  
>> org.apache.log4j.rolling.RollingFileAppender package and the  
>> rolling policy for a project im working on which requires  
>> customised subclassed logging features. What can I use now to get  
>> the same features ?
>>
>
> The extras companion (http://logging.apache.org/log4j/companions/ 
> extras) contains the org.apache.log4j.rolling.RollingFileAppender  
> and related classed backported for log4j 1.2.x.
>
>> I believe now in eclipse my xml configs are broken aswell,  
>> something doesnt like my xml config setup, what exactly is it  
>> now ? Here is an example of my current one
>>
>> <?xml version="1.0" encoding="UTF-8" ?>
>>
>> <!DOCTYPE configuration>
>>
>> <configuration xmlns="http://logging.apache.org/">
>> 	<appender name="TS000011-APP"  
>> class="org.apache.log4j.rolling.RollingFileAppender">
>>   		<rollingPolicy  
>> class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
>>   			<param name="fileNamePattern" value="logs/stats/TS000011/Red5_ 
>> %d{yyyyMMdd}.log"/>
>>   		</rollingPolicy>
>>
>>         <layout class="org.red5.server.logging.W3CLayout">
>>             <!--
>>             <param name="Fields"
>>                 value="field1,field2,field3"/>
>>                 -->
>>                 <!--
>>             <param name="Delimiter"
>>                 value="\t"/>
>>                 -->
>>         </layout>
>>     </appender>
>> </configuration>
>>
>> I get errors like
>>
>> log4j:WARN Element type "configuration" must be declared.
>>
>> Let me know
>
>
> log4j 1.2 requests a validated parse of the configuration file and  
> reports any validation errors to the console.  However, any  
> validation errors do not affect the configuration process.  Since  
> you did not specify any document type declaration, the parser has  
> no access to any element definitions which will result in the  
> message that you are seeing. To address this problem, start the  
> document with:
>
> <!DOCTYPE log4j:configuration SYSTEM 'log4j.dtd'>
> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
>    <appender...>
>    ...
> </log4j:configuration>
>
> The URL for the DTD only has to end with log4j.dtd, their doesn't  
> need to be anything at the URL as It will be resolved by the  
> DOMConfiguration from a copy embedded in the jar file.  The  
> log4j.dtd is a bit weird that configuration element is namespace  
> qualified (expects the log4j prefix and the jakarta URL), but  
> interior elements don't have a prefix or namespace.  Neither log4j  
> 1.2 or 1.3 requested a namespace aware parse, so you could make up  
> a namespace and not see the effects, but any migration tools may  
> require that configuration files be namespace valid or use the  
> established namespace.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message