[prev in list] [next in list] [prev in thread] [next in thread]
List: log4net-user
Subject: RE: log4net logging not working
From: "Dean Fiala" <dfiala () celadonlabs ! com>
Date: 2006-06-29 12:48:59
Message-ID: 20060629124948.0DE0010FB013 () asf ! osuosl ! org
[Download RAW message or body]
ASP.NET is not a console application, hence no console output. If you want
to see the log information in Visual Studio's output window, you need to
configure a trace appender. You can do this in code, or you use the
XmlConfigurator to load in the configuration information.
<?xml version="1.0" encoding="utf-8"?>
<log4net threshold="INFO">
<!-- to see in output window use the trace appender -->
<appender name="ASPNETDebugger" type="log4net.Appender.TraceAppender">
<layout type="log4net.Layout.SimpleLayout" />
</appender>
<root>
<level value="ALL" />
<appender-ref ref="ASPNETDebugger" />
<!-- Other Appenders here -->
</root>
</log4net>
_____
From: Gary Hinger [mailto:Gary.Hinger@wildtangent.com]
Sent: Wednesday, June 28, 2006 9:10 PM
To: Log4NET User
Subject: RE: log4net logging not working
I think I solved my own problem.
Aapparently, it's necessary to give IWAM_machinename write permissions to
the log files. This solved the problem of writing to files. BTW, I'm using
an IIS 5.1 server.
I'm still curious as to why there is no console output after
BasicConfigurator.Configure().
_____
From: Gary Hinger [mailto:Gary.Hinger@wildtangent.com]
Sent: Wednesday, June 28, 2006 5:44 PM
To: log4net-user@logging.apache.org
Subject: log4net logging not working
Every kind of log4net logging I've tried fails to work.
For example, even attempting basic logging in a C# web app results in no
console output:
BasicConfigurator.Configure();
log.Fatal( "Hello world!" );
Any ideas?
[Attachment #3 (text/html)]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:v =
"urn:schemas-microsoft-com:vml" xmlns:o =
"urn:schemas-microsoft-com:office:office" xmlns:w =
"urn:schemas-microsoft-com:office:word"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2912" name=GENERATOR><!--[if !mso]>
<STYLE>v\:* {
BEHAVIOR: url(#default#VML)
}
o\:* {
BEHAVIOR: url(#default#VML)
}
w\:* {
BEHAVIOR: url(#default#VML)
}
.shape {
BEHAVIOR: url(#default#VML)
}
</STYLE>
<![endif]-->
<STYLE>@font-face {
font-family: Tahoma;
}
@page Section1 {size: 8.5in 11.0in; margin: 1.0in 1.25in 1.0in 1.25in; }
P.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
LI.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
DIV.MsoNormal {
FONT-SIZE: 12pt; MARGIN: 0in 0in 0pt; FONT-FAMILY: "Times New Roman"
}
A:link {
COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
COLOR: windowtext; FONT-FAMILY: Arial; mso-style-type: personal
}
SPAN.EmailStyle18 {
COLOR: navy; FONT-FAMILY: Arial; mso-style-type: personal-reply
}
DIV.Section1 {
page: Section1
}
</STYLE>
</HEAD>
<BODY lang=EN-US vLink=purple link=blue>
<DIV dir=ltr align=left><SPAN class=463243812-29062006><FONT face=Arial
color=#0000ff size=2>ASP.NET is not a console application, hence no console
output. If you want to see the log information in Visual Studio's output
window, you need to configure a trace appender. You can do this in code, or you
use the XmlConfigurator to load in the configuration
information.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=463243812-29062006><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=463243812-29062006>
<P><FONT face=Arial size=2></FONT><FONT face=Arial color=#0000ff size=2><?xml
version="1.0" encoding="utf-8"?><BR><log4net
threshold="INFO"></FONT></P>
<P><FONT face=Arial color=#0000ff size=2> <!--<SPAN
class=463243812-29062006> </SPAN>to see in output window use the trace
appender --><BR> <appender name="<SPAN
class=463243812-29062006>ASPNET</SPAN>Debugger"
type="log4net.Appender.TraceAppender"><BR> <layout
type="log4net.Layout.SimpleLayout"
/><BR> </appender><BR> <root><BR> <level
value="ALL" /><BR> <appender-ref ref="<SPAN
class=463243812-29062006>ASPNET</SPAN>Debugger" /><BR> <!--
Other Appenders here
--><BR> </root><BR></log4net><BR></FONT></SPAN></P>
<P><FONT face="Courier New"><FONT size=2><FONT
color=#0000ff></P></FONT></FONT></FONT>
<P><BR></P></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> Gary Hinger
[mailto:Gary.Hinger@wildtangent.com] <BR><B>Sent:</B> Wednesday, June 28, 2006
9:10 PM<BR><B>To:</B> Log4NET User<BR><B>Subject:</B> RE: log4net logging not
working<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV class=Section1>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: Arial">I think I solved my own
problem.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: \
Arial"><o:p> </o:p></SPAN></FONT></P> <P class=MsoNormal><FONT face=Arial \
color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: \
Arial">Aapparently, it’s necessary to give IWAM_machinename write permissions \
to the log files. This solved the problem of writing to files. BTW, I’m using \
an IIS 5.1 server.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: \
Arial"><o:p> </o:p></SPAN></FONT></P> <P class=MsoNormal><FONT face=Arial \
color=navy size=2><SPAN style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: \
Arial">I’m still curious as to why there is no console output after
BasicConfigurator.Configure().<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial color=navy size=2><SPAN
style="FONT-SIZE: 10pt; COLOR: navy; FONT-FAMILY: \
Arial"><o:p> </o:p></SPAN></FONT></P> <DIV>
<DIV class=MsoNormal style="TEXT-ALIGN: center" align=center><FONT
face="Times New Roman" size=3><SPAN style="FONT-SIZE: 12pt">
<HR tabIndex=-1 align=center width="100%" SIZE=2>
</SPAN></FONT></DIV>
<P class=MsoNormal><B><FONT face=Tahoma size=2><SPAN
style="FONT-WEIGHT: bold; FONT-SIZE: 10pt; FONT-FAMILY: \
Tahoma">From:</SPAN></FONT></B><FONT face=Tahoma size=2><SPAN style="FONT-SIZE: \
10pt; FONT-FAMILY: Tahoma"> Gary Hinger [mailto:Gary.Hinger@wildtangent.com] \
<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Wednesday, June 28, 2006 \
5:44 PM<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B>
log4net-user@logging.apache.org<BR><B><SPAN
style="FONT-WEIGHT: bold">Subject:</SPAN></B> log4net logging not
working</SPAN></FONT><o:p></o:p></P></DIV>
<P class=MsoNormal><FONT face="Times New Roman" size=3><SPAN
style="FONT-SIZE: 12pt"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Every kind of log4net logging I’ve
tried fails to work.<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">For example, even attempting basic
logging in a C# web app results in no console
output:<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier \
New'"> \
BasicConfigurator.Configure();<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face="Courier New" size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier \
New'"> \
log.Fatal( "Hello world!" );<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"><o:p> </o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Any
ideas?<o:p></o:p></SPAN></FONT></P>
<P class=MsoNormal><FONT face=Arial size=2><SPAN
style="FONT-SIZE: 10pt; FONT-FAMILY: \
Arial"><o:p> </o:p></SPAN></FONT></P></DIV></BODY></HTML>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic