You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by "Schuweiler, Joel J." <Sc...@mayo.edu> on 2005/06/30 22:32:47 UTC

Patternlayout ?? question

I'm using the following in my socketserver xml configuration

	<layout class="org.apache.log4j.PatternLayout">
        	<param name="ConversionPattern" value="%C %d %p %r %F %L %l %m %n"/>	
	</layout> 

I wind up with log messages where the C L and l are question marks, how can I resolve this issue?

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Patternlayout ?? question

Posted by Curt Arnold <ca...@apache.org>.
On Jun 30, 2005, at 3:32 PM, Schuweiler, Joel J. wrote:
> I'm using the following in my socketserver xml configuration
>
>     <layout class="org.apache.log4j.PatternLayout">
>             <param name="ConversionPattern" value="%C %d %p %r %F % 
> L %l %m %n"/>
>     </layout>
>
> I wind up with log messages where the C L and l are question marks,  
> how can I resolve this issue?



Compile with debug information.  Those fields depend on the class,  
line number, source file name, etc being present in the Java class  
file.  If you compile without debug information, where is no location  
information to extract so question marks are displayed.  Please note  
that each of those fields can be very expensive to determine and will  
substantially reduce the speed of logging.  For example, it would be  
much faster to use %c (the logger (formerly category) name)  than %C   
and %c will work regardless of whether debug information is compiled  
into the class.


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org