John,

Exes will run under the security credentials of the user that started
them (unless you specify someone else using "Run As"). If the account
you are using does not have write permission to the directory it is
trying to log to then it won't/can't be created.

When you tested the "C# windows exe" was it running on your local PC?
Were you trying to write it to a folder on your local PC?

Scott
 

-----Original Message-----
From: John Deviney [mailto:[EMAIL PROTECTED] 
Sent: Thursday, June 23, 2005 3:15 PM
To: Log4NET User
Subject: RE: Log File Not Created with Pure XML Configuration

Thanks for the response.

Could this be a security issue?  I tested a pure xml configuration in a
simple C# windows exe and had the same problem, no log file created and
no evidence of a configuration being loaded in log4net debug.

I thought a pure win exe had full access by default to everything on a
local machine including the file system.  The log4net docs mentioned a
possible security issue if you used a non-application config xml file
but not if you configure through the App.config.

Could this be a bug in log4net?

John

--- Scott Wojan <[EMAIL PROTECTED]> wrote:

> John,
> 
> I just tested the config file you sent (both ways) and it seems to 
> work for me.
> I'm sorry, I guess you'll have to wait for someone more familiar with 
> it than I am.
> 
> Thanks,
> Scott
> 
> 
>  
> 
> -----Original Message-----
> From: John Deviney [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 22, 2005 12:35 PM
> To: 'Log4NET User'
> Subject: RE: Log File Not Created with Pure XML Configuration
> 
> Yes, that was the only change.  I did leave out some additional 
> configuration unrelated to log4net for brevity.
> Here is the complete
> App.config just in case something else in the file might be causing a 
> problem.  Also, we are using an interop product, JNBridge, to allow a 
> C# client to talk to a Java server.  So, there are actually several 
> other jnbridge assemblies that are referenced indirectly.
> 
> <?xml version="1.0" encoding="utf-8" ?> <configuration>
> 
>    <configSections>
> 
>          <!-- section name="log4net"
> type="System.Configuration.IgnoreSectionHandler,
> log4net"/ -->    
>          <section name="log4net"
>
type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/>
> 
>          <sectionGroup name="jnbridge">
>                  <section name="dotNetToJavaConfig"
>       
>
type="System.Configuration.SingleTagSectionHandler"/>
>                  <section name="javaToDotNetConfig"
>       
>
type="System.Configuration.SingleTagSectionHandler"/>
>                  <section name="tcpNoDelay"
>       
>
type="System.Configuration.SingleTagSectionHandler"/>
>                  <section name="javaSideDeclarations"
>       
>
type="System.Configuration.NameValueSectionHandler"/>
>          </sectionGroup>
>    </configSections>
>       
>       <system.windows.forms jitDebugging="true" />
>       
>       <appSettings>
>          <add key="activedirectory.server" value="eagle"
> />
>          <add key="activedirectory.port" value="389" />
>          <add key="activedirectory.parentNode"
> value="DC=twia,DC=org"
> />
>          <add key="log4net.Internal.Debug" value="true"/>
>       </appSettings>
>               
>    <log4net>
>          <appender name="LogFileAppender"
> type="log4net.Appender.FileAppender">
>                  <param name="File" value=".//tos.net-ri.log" />
> 
>                       <param name="AppendToFile" value="false" />
>                       <layout type="log4net.Layout.PatternLayout">
>                               <param name="Header" value="[Entry]\r\n"
> />
>                               <param name="Footer" value="[Exit]\r\n"
> />
>                               <param name="ConversionPattern"
> value="%d %-4r [%t] %-5p %c %x - %m%n" />
>                       </layout>
>               </appender>
>               <root>
>                       <level value="DEBUG" />
>                       <appender-ref ref="LogFileAppender" />
>               </root>
>       </log4net>
>       
>       <jnbridge>
>               <dotNetToJavaConfig 
>                       scheme="sharedmem"              
>                       jvm="E:/j2sdk1.4.2_05/jre/bin/server/jvm.dll"
>       
>
jnbcore="../../../tbot-server-proxy/depends/java/jnbcore.jar"
>       
>
bcel="../../../tbot-server-proxy/depends/java/bcel-5.1-jnbridge.jar"
>       
>
classpath="../../../tbot-server-proxy/depends/java/commons-collections-2
> .1.1
>
.jar;../../../tbot-server-proxy/depends/java/commons-logging-1.0.4.jar;.
> ./..
>
/../tbot-server-proxy/depends/java/log4j-1.2.8.jar;../../../tbot-server-
> prox
>
y/depends/java/hibernate3.jar;../../../tbot-server-proxy/depends/java/jb
> ossa
>
ll-client.jar;../../../tbot-server-proxy/depends/java;../../../tbot-serv
> er-p
>
roxy/depends/java/common.jar;../../../tbot-server-proxy/depends/java/tbo
> t-sy
>
stem.jar;../../../tbot-server-proxy/depends/java/tbot-ejb.jar;../../../t
> bot-
>
server-proxy/depends/java/client.jar;../../../tbot-server-proxy/depends/
> java
>
/tbot-test.jar;../../../tbot-server-proxy/depends/java/thirdPartyTools.j
> ar;.
>
./../../tbot-server-proxy/depends/java/commons-validator-1.1.4.jar;../..
> /../
>
tbot-server-proxy/depends/java/commons-digester-1.5.jar;../../../tbot-se
> rver
> -proxy/depends/java/commons-beanutils.jar"
>                       jvmOptions.0="-Xmx400m"
>       
>
jvmOptions.1="-Djava.security.auth.login.config=file:../../../tbot-serve
> r-pr
> oxy/depends/java/auth.conf"
>       
>
jvmOptions.2="-Dapp.home=../../../tbot-server-proxy/depends/java"
>               />
>       </jnbridge>
>       
> </configuration>
> 
> John Deviney
> Texas Windstorm Insurance Association
> 5700 S. MoPac Exp., Building E, Suite 530 Austin, TX
> 78749
> [EMAIL PROTECTED]
> 
> 
> -----Original Message-----
> From: Scott Wojan [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 22, 2005 12:21 PM
> To: Log4NET User
> Subject: RE: Log File Not Created with Pure XML Configuration
> 
> 
> I just wanted to make sure your app could see the config file.
> 
> So the only changes are:
> <section name="log4net"
>
type="System.Configuration.IgnoreSectionHandler,log4net"/>
> <section name="log4net"
>
type="log4net.Config.Log4NetConfigurationSectionHandler,log4net"/>
> 
> Right?
> 
> 
> Nicko, do you have any thoughts on this?
> 
> -Scott
> 
> 
> -----Original Message-----
> From: John Deviney [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 22, 2005 11:57 AM
> To: 'Log4NET User'
> Subject: RE: Log File Not Created with Pure XML Configuration
> 
> Scott,
> 
> Yes, debugFlag = "true".
> 
> John Deviney
> Texas Windstorm Insurance Association
> 5700 S. MoPac Exp., Building E, Suite 530 Austin, TX
> 78749
> [EMAIL PROTECTED]
> 
> 
> -----Original Message-----
> From: Scott Wojan [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, June 22, 2005 10:33 AM
> To: Log4NET User
> Subject: RE: Log File Not Created with Pure XML Configuration
> 
> 
> John,
> 
> Can you test the following:
> Put:
> string debugFlag =
> 
=== message truncated ===



                
__________________________________
Yahoo! Mail
Stay connected, organized, and protected. Take the tour: 
http://tour.mail.yahoo.com/mailtour.html 

++++++CONFIDENTIALITY NOTICE++++++ 
The information in this email may be confidential and/or privileged. This email 
is intended to be reviewed by only the individual or organization named above. 
If you are not the intended recipient or an authorized representative of the 
intended recipient, you are hereby notified that any review, dissemination or 
copying of this email and its attachments, if any, or the information contained 
herein is prohibited. If you have received this email in error, please 
immediately notify the sender by return email and delete this email from your 
system. 

Reply via email to