Can you create a file manually in the directory?  Could be there is a
conflicting permission setting.

  _____  

From: Dominick Cosgrove [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 04, 2007 3:57 AM
To: Log4NET User
Subject: RE: Log4Net Issue on Windows 2003 Server



I'm running the app as a local administrator so it should have access to all
folders. I have tried explicitly setting the permissions on the folder
C:\logs for the file appender with out any luck. It appears that this issue
is only on one Win2003 server as I have now tried the app on 3 XP machines
and 5 Win2003 servers and it works fine. Unfortunately I can't get any
logging working on this server and it's my DEV box so would be great if I
could get this working, with out having to rebuild it.

 

Any other suggestions.

 

regards

 

Dominick Cosgrove

 

From: Jeff R [mailto:[EMAIL PROTECTED] 
Sent: 29 June 2007 18:29
To: Log4NET User
Subject: RE: Log4Net Issue on Windows 2003 Server

 

make sure credentials that app runs under on the server has write access to
the folder you're writing to.



  _____  

From: [EMAIL PROTECTED]
To: [email protected]
Date: Fri, 29 Jun 2007 12:34:15 +0100
Subject: Log4Net Issue on Windows 2003 Server

I have a .Net 1.1 Console App that I have log4net implemented as the logger.
The app logs correctly on my local machine (Win XP) but not my dev server
(Win 2003). I have tested the application on a number of other Win 2003
servers and it seems to run fine. I have enabled log4net internal debugging
but nothing is being logged. When I debug the app on my Dev Server the log
instance does not seem to be initialised correctly.

 

private static readonly log4net.ILog log =
log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod()
.DeclaringType);

 

I've used the [assembly: log4net.Config.XmlConfigurator(Watch=true)] in the
AssemblyInfo.cs to configure it. 

 

Here is the App.Config:

 

 

<?xml version="1.0" encoding="utf-8"?>

<configuration>

      <configSections>

            <section name="log4net"
type="System.Configuration.IgnoreSectionHandler" />

      </configSections>

      <appSettings>

            <add key="log4net.Internal.Debug" value="true"/>

            <add key="GPD.AD.UserInfo"
value="http://gimvsrvdev100/WebServices/ActiveDirectory/UserInfo.asmx"/>

            <add key="GPD.ListsWS.Lists"
value="http://gimvsrvdev100:88/Directory/_vti_bin/Lists.asmx"/>

            <add key="GPD.ListName" value="Gartmore Phone Book" />

      </appSettings>

      <log4net>

            <appender name="RollingLogFileAppender"
type="log4net.Appender.RollingFileAppender">

                  <file value="C:\rolling-log.txt" />

                  <appendToFile value="true" />

                  <maxSizeRollBackups value="10" />

                  <maximumFileSize value="100" />

                  <rollingStyle value="Size" />

                  <staticLogFileName value="true" />

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

                        <header value="[Header]&#13;&#10;" />

                        <footer value="[Footer]&#13;&#10;" />

                        <conversionPattern value="%date [%thread] %-5level
%logger - %message%newline" />

                  </layout>

            </appender>

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

                  <file value="C:\Logs\GPD_SYNC.log" />

                  <!-- Example using environment variables in params -->

                  <!-- <file value="${TMP}\log-file.txt" /> -->

                  <AppendToFile value="true" />

                  <!-- An alternate output encoding can be specified -->

                  <!-- <encoding value="unicodeFFFE" /> -->

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

                        <header value="[Header]&#13;&#10;" />

                        <footer value="[Footer]&#13;&#10;" />

                        <conversionPattern value="%date [%thread] %-5level
%logger &lt;%property{auth}&gt; - %message%newline" />

                  </layout>

                  <!-- Alternate layout using XML                 

                  <layout type="log4net.Layout.XMLLayout" /> -->

            </appender>

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

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

                        <conversionPattern value="%date [%thread] %-5level
%logger &lt;%property{auth}&gt; - %message%newline" />

                  </layout>

            </appender>

            <root>

                  <level value="ALL" />

                  <!--appender-ref ref="RollingLogFileAppender" /-->

                  <appender-ref ref="LogFileAppender" />

                  <!--appender-ref ref="ConsoleAppender" /-->

            </root>

      </log4net>

      <system.diagnostics>

  <trace autoflush="true">

    <listeners>

      <add 

        name="textWriterTraceListener" 

        type="System.Diagnostics.TextWriterTraceListener" 

        initializeData="C:\Logs\log4net.log" />

    </listeners>

  </trace>

</system.diagnostics>

</configuration>

 

Any suggestions would be welcomed.

 

Many thanks

 

Dominick Cosgrove

To view our disclaimer see http://epolicy.gartmore.com

 
Gartmore Investment Management Limited (GIM), Gartmore Investment Limited
(GIL) and Gartmore Fund Managers Limited (GFM) are all registered in England
and Wales (nos 953703, 1508030 and 1137353). The registered address of GIM,
GIL and GFM is Gartmore House, 8 Fenchurch Place, London, EC3M 4PB. Gartmore
Global Partners (GGP) is a general partnership registered in Delaware, USA,
EIN 56-1903611. The registered office of GGP is One International Place,
Fort Hill Square, Boston, Massachusetts 02110, USA. GIL, GFM and GGP are
authorised and regulated by the Financial Services Authority under the
references 119236 (GIL), 122610 (GFM) and 172616 (GGP). See
www.fsa.gov.uk/register for more details. GGP is also a SEC registered
investment advisor. 
 

 

  _____  

Hotmail to go? Get your Hotmail, news, sports and much more! Check out the
New MSN Mobile <http://mobile.msn.com> 

Click
<https://www.mailcontrol.com/sr/3ju2TeHg0SjIUUjZ8r07yQltJC3DQ4irzxiuHZhtaoxP
3WWu5uvY!Tvs2SZU4j8N9L3G4zlF9ha+F4oUnYbIkBdnXMCVFW8ZGiPkjyczwA9CtKuPJf0kNRu6
92iKG0B7tdJ!kDyN7xsxy2EX+LIURWQRXNfZUZc1EfyoRKqtT7pPLMXDioZAY9rDTXtDM7Sk56mz
zoN3T6neCE3ZJ3S7nQu3Oi8n8onA> here to report this email as spam to
BlackSpider. Reporting this email as spam will automatically update the
anti-spam rules. 

Reply via email to