You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4net-user@logging.apache.org by mi...@yahoo.com on 2004/09/28 13:37:40 UTC

file output

hi,
 
i am using log4net in an application project with .net which read from machine.config and when i added these configuration to the machine.config to use the debuger view..it works well
<log4net>

<appender name="OutputDebugStringAppender" type="log4net.Appender.OutputDebugStringAppender">

<layout type="log4net.Layout.PatternLayout">

<conversionPattern value="%-5p [%t] %d{HH:mm:ss,fff} %c::%M (Line: %L): %m%n" />

</layout>

</appender>

<root>

<appender-ref ref="OutputDebugStringAppender" />

</root>

</log4net>

 
but when i add the next lines in the machine.config to have the log data in a file..it doesn't works :(          could any one tell me who to make it works
 

<log4net>

<appender name="FileAppender" type="log4net.Appender.FileAppender">

<param name="file" value="c:\log-file.txt" />

<param name="appendToFile" value="true" />

<layout type="log4net.Layout.PatternLayout">

<param name="Header" value="\r\n\r\n******************************************************Begin********************************************************\r\n"/>

<param name="Footer" value="******************************************************END**********************************************************"/>

<param name="conversionPattern" value="%-5p [%t] %d{HH:mm:ss,fff} %c::%M (Line: %L): %m%n" />

</layout>

</appender>

<root>

<appender-ref ref="FileAppender" />

</root>

</log4net>

 

thx,



Michael Magdy Lahzy


		
---------------------------------
Do you Yahoo!?
vote.yahoo.com - Register online to vote today!