Wednesday, January 07, 2009
 
 Google analytic  Print   

Log4Net Mail archive complete topic list


12/24/2008 7:41 AMMy log4net is not working on releases (but works on asp.net debug mode)
Replies: 1 Hi,I'm having problems getting logs to work. Here are some configuration snippets.// -- IN MY LOG4NET.XML ------------------------------------------<?xml version="1.0" encoding="utf-8" ?><!-- This section contains the log4net configuration settings --><!-- See http://logging.apache.org/log4net/release/manual/introduction.html for more information --><log4net>   ...
12/19/2008 10:58 PMstopping messages to standard out in console app
Replies: 1 I am using log4net in my .NET 3.5 console application and would like the log messages I generate to be seen in both the console standard out and the RollingFileAppender. The file output is working like a charm, but I am seeing a stream of status messages flowing to the console standard out when I execute. I would like to skip all the status information and only see the same messages I am program...
12/16/2008 10:44 AMCustomAppender and property
Replies: 3 Hi allI'm developping my own appender.Looking at some examples in the Net, I've found how to create property, I just have to use the same name in appender file and config file. - In the config file:<myProperty value="HelloWorld" /> - In the appender file:private string m_mypropertypublic string MyProperty{    get { returm m_myproperty; }    set { m_myp...
12/15/2008 7:12 PMLogging to a Listbox control
Replies: 1 Hi, I am trying to set up a Listbox control so I can output the contents of alog in real time to a Winforms GUI.  I am trying to use the MemoryAppenderand bind the Listbox.DataSource to the array returned by the MemoryAppenderbut all it does is output log4net.Core.LoggingEvent to the listbox andnothing else.  What is the best way to approach this problem?  Is it best touse another...
12/06/2008 2:28 PMRe: re: How to use separate config file for log4net
Replies: 1 HiFirst, thanks for replying me.now that is working.but now i wanna know, Should this piece of code be written  in constructorof each class i write.      FileInfo log4NetConfigFile = new FileInfo("log4net.config");  if (log4NetConfigFile == null || !log4NetConfigFile.Exists) throw newException("unable to find log file");log4net.Config.XmlConfigurator.ConfigureA...
12/05/2008 4:46 PMHow to use separate config file for log4net
Replies: 3 Hi allI want to use log4net with my project.here is the simple example i tried.App.config :<?xml version="1.0" encoding="utf-8" ?><configuration>    <configSections>       <section name="log4net"type="log4net.Config.Log4NetConfigurationSectionHandler, log4net"/>  </configSections>  <log4net>  &nb...
12/05/2008 12:55 PMCoding horror deadlock
Replies: 1 HiThose of you who reads coding horror, might have seen this post:http://www.codinghorror.com/blog/archives/001192.html.Could somebody explain me how this deadlock happend? And how do I avoid toget any deadlocks myself using log4net?
12/03/2008 7:42 PMerror XmlConfigurator: Failed to parse config file.
Replies: 2 I'm getting this error when running a unit test. It does complete the loggingin spite of this error. I need to resolve this so that the automated buildprocess does not fail. Any ideas?:log4net : error XmlConfigurator: Failed to parse config file. Is the<configSections> specified as: <section name="log4net"type="log4net.Config.Log4NetConfigurationSectionHandler,log4net,Version=1.2.10.0, ...
12/02/2008 3:14 PMlogging into different logfiles depending on parameter
Replies: 1 Hello,I'm trying to log in separate logfiles, depending on a parameter in myapplication. Until now I'm unable to.I have read about filters and what I tried is :in my app :log4net.GlobalContext.Properties["myparam"] = "xyz";log.Info("message 1");log4net.GlobalContext.Properties["myparam"] = "abc";log.Info("message 2");I'd like to have the 2 messages in different files. The filter I used is  ...
12/02/2008 1:31 AMBest Way to Set Up Massive Number of Loggers
Replies: 5 Hello-I'm working on an app that coordinates data transfers among multiple trading partners. I want to create a log file for each trading partner. I had a few ideas of how to do this, but am not sure which would be considered the optimal way. The expected number of trading partners is likely to be around 100, but could be higher. Here are my thoughts:1. Add a bunch of named loggers to my log4net.c...
12/01/2008 5:32 PMLogging issue, Repository count is 1
Replies: 1 I have two projects setup, one uses Unity depencency injection and the otheruses StructureMap. The project using Unity will log both from unit tests andfrom the web. The StructureMap project will only log from the unit test.As a note, when I call 'log =LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);'from the Unity project the LogManager Repository count is 0.Wh...
12/01/2008 4:43 PMStrong Name Key
Replies: 3 Just curious if there is any new information regarding theavailability of = the log4net private key.I have a project that uses log4net but requires a minor modificationto the=  code (RollingFileAppender RollFile method marked as virtual). This is a p= roblem b/c I also use some other assemblies (i.e.NHibernate) that use log4= net. Now I have two log4net assembliessigned w/ different ke...
11/26/2008 12:22 PMRe: Log4net.dll reference copy-local=true not behaving as expected
Replies: 2 Hi I have a custom log wrapper that utilizes log4net. I build a release assembly of MyLogWrapper.dll with log4net.dll reference set to copy-local true. Referencing MyLogWrapper.dll from MyProject with copy local set to true should result in log4net.dll being copied as well, right? I am not using any Log4net classes in MyProject as they are all wrapped in MyLogWrapper and therefore I do not...
11/25/2008 11:25 PMIssues configuring log4net programmatically
Replies: 0 Hi guys,I've got a Windows Forms Application written in C# under .NET 2.0. Inside the static main method for the application I've got the following:                FileAppender appender = new FileAppender();                appender.Layout = new SimpleLayout();                appe...
11/25/2008 9:05 PMconfiguration problems, not logging
Replies: 8 What's missing here? Using profiler, the database never receives the call.web.config:    <log4net>        <appender name="ADONetAppender"type="log4net.Appender.ADONetAppender">            <bufferSize value="100" />          &...
11/21/2008 1:37 PMgetting access to logfile programmatically
Replies: 0 Hi,   I have a distributed application running here and from time to time (when there's an error) we need to retrieve the logfile from the server. I need to do this programmatically. Can anybody tell me whats the best way to achieve this? I have configured my server side loggers thus; private static ILog logger = LogManager.GetLogger(typeof(MyClass));   and they work just fine. No...
11/21/2008 3:04 AMRollingFileAppender date pattern
Replies: 1 Hi all,   I’m fine tuning the logging but it’s not quite right… What I want is for the file to roll at midnight to a new date pattern file and roll within the same day if it reaches 50MB.   Eg.  Start up application, 21-NOV-2008,   file gets created myComp.Job Scheduler Service.20081121.log.txt   ideally, service continues to run, midnight rolls around and...
11/20/2008 3:56 PMHow to add extra information to log entries transparently?
Replies: 0 Hello everybody,   I have an application with a vast number of existing log statements. Now we have the new requirement to prefix each log entry depending on some user input (i.e. no static text).   An example: In the application, there is a statement     log.debug('foo') and we expect a log entry like     abcdef: foo where abcdef is a hash w...
11/14/2008 7:07 PMconversionPattern parameters
Replies: 1 Where can I find a list of conversionPattern parameters? I remember there being a parameter that would display the method you were in but I can't find it anywhere.Tom P. Get 5 GB of storage with Windows Live Hotmail. Sign up today.
11/14/2008 7:56 AMAdoNetAppender connection timeouts
Replies: 6 Hi peoples,   How does the ADO.Net appender handle intermittent connections?   I’m assuming that it’s holding a connection open and appending? I have <bufferSize value=”0”> set to ensure an immediate call to a stored proc for logging.   So basically, do I need to worry about whether or not my connection to the other end exists? Could the lack of a network connection ...
11/11/2008 10:34 PMTrying to set up an EXTREMELY SIMPLE event log feature... and failing terribly! Please help a newbie
Replies: 7 Hi and thanks in advance for the help.I'm tearing my hair out over here trying to get this to work: a siple loggerthat writes to the application section of the event log.This is using log4net 1.2.10.0Here is the app config:--------------------------------------------------------------<?xml version="1.0" encoding="utf-8" ?><configuration>  <configSections>   ...
11/10/2008 4:12 PMRolling database table appender (AdoNetAppender)
Replies: 0 Scenario:ASP.NET 2.0 application using AdoNetAppender to log custom data to a SQLServer 2005 database table.Question:Is there a way to configure log4net so that the size of the database tableor number of records in the table don't exceed a certain threshold?For ex. Can we configure log4net to* delete oldest records if table rowcount is greater than X OR* delete oldest records if table size is gr...
11/10/2008 12:50 PMConfiguring appenders through code
Replies: 0 Hi,   I'm configuring a log4net file appender through code.   1. I would like to add some machine details at the top of each log file (note: this is not a regular header! Its details are picked Via code, and should be written once at the top of each newly opened log file). In order to add this info to each file, I would have to get some sort of an event for a new file being ope...
11/09/2008 10:36 AMPrinting a log message of level 'ALL'
Replies: 2 Hi,   In some cases I would like to print messages to the log of my application, At a level lower than ‘DEBUG’.   I’ve noticed in the documentation that the level ‘ALL’ should do it, But I failed to find a way to print messages for this level. For instance ILog interface has methods for printing messages of levels: ‘DEBUG’, ‘INFO’, ‘WARN’, ‘ERROR’, ‘FATAL’, But none for the lev...
11/06/2008 12:59 PMSQL 2005 Database Mirroring Support
Replies: 7 Does log4net support the database mirroring feature in SQL 2005?   It logs quite happily when logging to our primary database but when I failover logging ceases to work – in that nothing is logged – when I failback logging works as before.  The mirroring has been configured correctly (test has been done to verify this) so I think I can rule this out.   Other than the followin...
11/05/2008 1:04 PMFW: Problems with Network Drive
Replies: 3 I am trying to log to a Network Drive using a RollingFileAppender but am having problems.  When I set the file parameter value to a UNC value (\\servername\sharename\Alert.txt) it works fine However, when I try to set it to a mapped drive value which refers to the same path it fails. The internal debug is showing this: log4net:ERROR [RollingFileAppender] No output stream or fil...
11/04/2008 6:37 PMApacheCon live video streaming available; keynotes and Apache 101 are free
Replies: 0 Can't make ApacheCon this week in New Orleans?  You can still watch allthe keynotes, Apache 101 sessions, and system administration track inlive video streams:   http://streaming.linux-magazin.de/en/program_apacheconus08.htm?annKeynotes and the Apache 101 lunchtime sessions are free; the fullsysadmin track, including httpd performance, security, and server stackadministration talk...
10/31/2008 2:14 PMSet & Get MemoryAppender from a named Logger
Replies: 2 Following statements are not supportet...// Getting a Specific Appender from a specific logger IAppender myapp =LogManager.GetLogger("MyNamedLogger1").GetAppender("MyNamedAppender");// attaching a specific Appender to a specific logger LogManager.GetLogger("MyNamedLogger1").SetAppender("MyNamedAppender");How can I access a desired Appender of a known logger directly, withoutiterating o...
10/30/2008 1:53 PMwhen to use strong name confusion
Replies: 9 Hello,   Not sure I understand the strong name requirements.  I'm on .Net 2.0.  There is already a .dll in the log4net-1.2.10\bin\net\2.0 dir. Do I need to rebuild this .dll with a strong name key or can I just use this dll as it is ?    I know what a strong name is and how to generate a private/public key but still not sure how this relates to when and...
10/30/2008 11:22 AMUsing log4Net from my web service (.net 2.0, C#); nothing happens
Replies: 2 My web service is using C# and .Net 2.0When a "handled" exception is thrown during the web service call, theservice should return normally but should log some information so some adminchappie can look at it later.So I thought of usnig log4net but don't know how to. After checking on thenet, it seemed easy enough:1: This is In my web.config file of the web service:********************************...
10/27/2008 11:16 AMHelp me with dinamically setting up the RollingFileAppender please
Replies: 3 Hello,  I have just downloaded the log4net and I can't use the RollingFileAppender. Check my code please: // ################################################################### var appender = new log4net.Appender.RollingFileAppender(); appender.AppendToFile = true; appender.File = "log.txt"; appender.MaxFileSize = 10000; appender.MaxSizeRollBackups = 10; appender.RollingStyle = log...
10/25/2008 3:46 PMlog4net support for .NET framework 3.5
Replies: 2 I just want to know that which version of log4net support Microsoft .NETframework 3.5? Is there any such version exists at all till now?--View this message in context: http://www.nabble.com/log4net-support-for-.NET-framework-3.5-tp20164275p20164275.htmlSent from the Log4net - Dev mailing list archive at Nabble.com.
10/23/2008 7:55 AMPartial configuration of an AdoNetAppender in the config File
Replies: 1 Good Morning,Is it possible to partially configure an AdoNetAppender with an config File and later pass him in the source code the connetion string and type?So I try to use the sample config below to to configur with XMLConfiguration and then pass the connetion string and type but I don't get it to work?Any Suggestions?Thanks in advance.RegardsBernhardSample Config.</log4net>   &n...
10/23/2008 2:52 AMCan't get C# program to use log4net.xml
Replies: 2 Hi -1. I'm using C# and Visual Studio 20082. I created a minimal C# that invokes log4net:using log4net;using log4net.Config;...    public class DeleteLogs2 {      private static readonly ILog logger =        LogManager.GetLogger (typeof (DeleteLogs2));       static void Main (string[] arg...
10/22/2008 2:08 PMHow to pass password to AdoNetAppender?
Replies: 8 Hi,another Question from the new guy.I want to pass the username and password for the database to the AdoNetAppender.The two ways I found were:* Plaintext in the config file.* 'Plaintext' in the sourcecode.Both ways are not optimal, so were I missing something? Is there a smarter way of passing a password?Thanks in advance.RegardsBernhard Connect to the next generation of MSN Messenger  Ge...
10/21/2008 3:15 PMAbortion with non Empty Buffer
Replies: 1 Hi,I am using log4net with an AdoNetAppender and wondering what happens when the program exits on message 125 when the buffersize is set to 10.It seems that the messages 121-125 are dropped to nirvana. Is this assumption right and how can I work around?Thanks in advance.Bernhard Explore the seven wonders of the world Learn more!
10/16/2008 3:28 PMAdoNetAppender Connection String
Replies: 2 Hello.   I am trying to retrieve the connection string within my logging.config (a separate file outside the web.config in case that is significant) file.   I am using the code below but it seems to use a default(?) logger which is not defined in my config file (a TextWriterAppender).   I am wondering if this is occurring because the config file cant be located or the code I...
10/13/2008 9:39 AMNot able to see full log messages if file size crosses the maximum file size set in app.config
Replies: 0 Hi all,am using log4net for my project.In log4net am getting the issue when the file size crosses the maximum filesize set in  app.config(e.g. 1MB etc).Am not able  to  view the  file .2 files are created( if crossed 1MB).I cansee one line in one log file(currently updated line).If next line comingmeans, the last updated line in the log is goes to another log file.i am notabl...
10/10/2008 6:05 PMLog4Net and MSTest
Replies: 1 Does anyone use MSTest and if so, have you had success in getting logging to work with your tests?   Normally, in my application log4net is configured by a call to:    log4net.Config.XmlConfigurator.Configure(logConfigFile);   But, I’m writing tests for one of my library projects, so I don’t see a good place to put such a statement.   I thought I would try using t...
10/09/2008 7:01 AMPort Number in logged message
Replies: 2 Hi Is there a config setting that enables log4net to put “port” and “hostname” information in the log messages when running in a ASP.NET Webservice (or website) ?    I see conversion pattern in the FAQ and wonder if I there is a %port available? <conversionPattern value="%date [%thread] %-5level %logger [%ndc] - %message%newline" />   My use case is that I have multipl...
10/06/2008 11:53 PMRollingFileAppender datePattern
Replies: 1 I have a RollingFileAppender defined like so:  <appender name="XMLRollingFile" type="log4net.Appender.RollingFileAppender">    <threshold value="DEBUG" />    <staticLogFileName value="true" />    <file value="MyLog.xml" />    <appendToFile value="true" />    <rollingStyle value="Date" /...
10/05/2008 3:43 PMUsing log4Net to log multiple files by different users/tasks
Replies: 7 I have an asp.net site in which different users run different tasks.  Each individual task is managed by a TaskManager that I'm writing.  While each task is running it has the opportunity to log to it's own log file.  I'm trying to use Log4Net to do this, but so far I've been unable to figure out how exactly to accomplish this.  Any advice would be appreciated.   So far,...
10/04/2008 6:42 PMFwd: CFP open for ApacheCon Europe 2009
Replies: 0 Begin forwarded message:> From: Noirin Shirley <noirin@apache.org>> Date: October 2, 2008 3:22:06 AM CDT...> If you only have thirty seconds:>> The Call for Papers for ApacheCon Europe 2009, to be held in> Amsterdam, from 23rd to 27th March, is now open! Submit your> proposals at http://eu.apachecon.com/c/aceu2009/cfp/ before 24th> October.>> Remember that ear...
10/03/2008 3:57 PMLog4net in a windows service
Replies: 14 Hi, I have a logging DLL which uses log4net to log to a database. I have c# application which calls this logging DLL and log to the database. Within my logging DLL I perform additional work and hence it acts as a wrapper for log4net.   In my C# windows service project, in assemblyinfo.cs I added   Assembly: log4net.Config.XmlConfigurator(ConfigFile:="mywindowsservice.dll.config",...
10/02/2008 8:44 PMReplacing text in log messages
Replies: 2 Hello,I am trying to replace certain text strings in log messages, based ona regular expression. The goal is to prevent sensitive informationbeing logged.Is there any easy way of doing this?I have so far tried to write a simple implementation of theIObjectRenderer as  a small end to end testnamespace Log4netRegexpRenderer{     public class RegexpObjectRenderer : IObjectR...
10/02/2008 8:39 PMComposite rollingStyle
Replies: 1 Hello,The Composite rollingStyle doesn't seem to work for the FileAppender as it does for the RollingFileAppender. That is, I have one TrittiSvcLog.xml file that keeps getting bigger and bigger but I have a current TrittiSvcLog.txt and a TrittiSvcLog.txt20081001 from yesterday. Also, is there a way to have the file be named TrittiSvcLog-20081001.txt instead?Thanks,Bill <appender name="File...
10/02/2008 6:39 PMcustom fields?
Replies: 7 Hello,Is it possible to add custom fields to log4net. I'd like to be able to do something like this:log.InfoFormat("Custom1", "Custom2", "Custom3", "{0}","Message");and then have an appender look something like:<layout type="log4net.Layout. PatternLayout">  <conversionPattern value="%custom1 %custom2 %custom3 %message%newline" /></layout>Thanks,Bill
10/01/2008 11:27 PMChained loggers
Replies: 2 Hi,I'm trying to create a chained logger according to the following logic:if ( condition1 == true && condition2 == true ){ accept}How can this be specified in XML?Here is what I have tried:<appender name="SupportToolAppender"             type="log4net.Appender.AdoNetAppender">     <filter type="...
10/01/2008 9:34 PMConfiguration system enhancement
Replies: 1 Hi    We are using log4net through out all our applications and are veryhappy with it. I would like to know however if you ever consideredenhancing the configuration system. I would be especially interested inbeing able to fully initialize log4net programmatically. All the sampleI have been able to find are always using an xml description but thereare parameters we need to pass to...
09/30/2008 5:29 PMAppender to run at a Schedule Time
Replies: 1 Hi,I need to run the smtp appender at a specified interval of time.Any ideas how I can do this to that the appender will run at specificintervals and send all the buffered messages.Any pointers will be helpful.Thanks in advance.Thanks,Hemant
09/23/2008 10:03 PMroll over does not happen when iis application pool recycle
Replies: 0 hi, guysthe hourly roll over is OK most of the time; only for one hour when the server's application pool recycle the expected roll over file never shows up.for example:mylog.20080901-00mylog.20080901-01mylog.20080901-02mylog.20080901-03 <- this one never shows up and iis recycle happens at 03:XXmylog.20080901-04...any idea?thanks,rao
09/18/2008 3:50 PMlogger and app domains
Replies: 4 Hi,   I have an issue with a GUI app I'm running. I make calls across dll's as expected and my logging works fine. I have a richTextappender in place thats used by the GUI. As logging is done I see it in the richText box of my gui. We'll call this "normal" execution.   Now as part of our testing, I create an appDomain and make the method calls just as does the "normal" execution.&nbs...
09/18/2008 12:47 PMHow to find where log4net is logging to at runtime
Replies: 1 Hi,I am using this code to load in an XML config file:FileInfo configFile = new FileInfo("C:\\Log4Net.Config");log4net.Config.XmlConfigurator.ConfigureAndWatch(configFile);How can I then find out where Log4Net is logging to so I can display thisinfo to my user and tell them to look in the log file at X?ThanksAmy--View this message in context: http://www.nabble.com/How-to-find-where-log4net-is-lo...
09/16/2008 10:08 PMRollingFileAppender generates unexpected filename and/or causes IIS to hang
Replies: 2 We are using rolling file appender in an IIS managed C# application. Our log4Net deployment is configured with the following options specified in basic.xml: <appendToFile value="false" /> <countDirection value="0" /> <maximumFileSize value="512KB" /> <maxSizeRollBackups value="100" /> <rollingStyle value="Once" /> <staticLogFileName value="false" />. The file ...
09/16/2008 11:05 AMProblems with NUnit and log4net
Replies: 0 Hi,We are using log4net in conjunction with NUnit and MSBuild.We are testing a cache implementation which requires the usage oflog4net and Common Logging (from the Spring Framework).When running unit tests, each invocation of a test case which causes alog entry to be created in turn causes log4net to blow up on the tracewith the following:log4net:ERROR [TraceAppender] Failed in DoAppendSystem.Th...
09/16/2008 4:20 AMclosed connection errors with AdoNetAppender & MySQL Connector/NET
Replies: 0 Hi,Has anyone ever experienced frequent "closed connection" errors inlog4net while using the AdoNetAppender with MySQL Connector/NET in anASP.NET application (stack traces below)?I know this isn't strictly a log4net question, but I'm wondering ifanything about log4net might be contributing to the problem.  The erroroften happens when the associated app pool is recycled, but it sometimeshapp...
09/12/2008 1:05 PMGetting RollingLogFileAppender to write to Windows LocalAppData directory
Replies: 1 HelloI configured the RollingLogFileAppender in my application .config filehoping that it would write my log file into the windows users local app datadirectory.What I did not realize is that ${LOCALAPPDATA} is a Vista only environmentalkey and it's failure to resolve on XP machines caused unexplainableperformance issues.Can another tell me if there is a recommended way to get theRollingLogFileA...
09/11/2008 9:27 PMProblems with RollingFileAppender while using it with AsyncAppender
Replies: 1 Hello,I am using an AsyncAppender with a RollingFileAppender.  The problem I amhaving is that the rolling file appender will not roll to another file whenattached to the AsyncAppender.  The rollingfileappender works fine byitself.  Why does the RollingFileAppender not work with AsyncAppender? Anyclues’ to why....Dawn
09/11/2008 2:27 PMSame file read/write from Multiple process
Replies: 3   Hi All,I am considering to use Log4Net in a web service to write to a single logfile. I want to know whether writing to a single file in this manner throughLog4Net is safe.  The current code I have implemented is in C# in which I amwriting to a single file which gives me error "The process cannot access thefile XXXXX because it is beign used by another process"To resolve the above pro...
09/10/2008 6:44 PMGAC vs. XmlHierarchyConfigurator Problem
Replies: 2 I've found a few posts on Google about this issue, but none seem to be the exact problem I'm having. When I started adding log4net to some of my projects, I just added a reference to the dll, which was then copied to the output directory. I added this following code to my AssemblyInfo file, setup the app.config and everything worked like a champ.   <Assembly: log4net.Config.XmlConfigur...
09/02/2008 1:03 PMAdditivity flag question
Replies: 1 Hello,I'd like to control the Additivity flag programmatically. I know that itcan be changed from the config file but want to change it within aprogram. The flag is a parameter of the Logger class but not on the ILoginterface. If possible, what's the preferred method of doing this?Thanks in advance,Mark
09/02/2008 11:43 AMDatabase logging problems
Replies: 2 Hi,   I've been playing with log4net and writing to file seems to work okay =20 but when I try logging to a database nothing happens...   To explain a little more... I'm running a trace on the database and I =20 can see that it's trying to commit a transaction but it's not =20 resulting in any writes. I was playing with this for hours yesterday, =20 turned on the machine this morni...
09/01/2008 8:54 AMQuestion about using log4net with chainsaw
Replies: 0 HiI'm using log4net and would like display log messages with apachechainsaw.For this reason I've added an UDPAppender. I got it to work but therestill exists a problem.All messages are displayed in chainsaw in the default table.Because I have a lot of instances of my App running, I want to show thelog messages of each instance in its own table in apache chainsaw.I read in the Tutorial that there...
09/01/2008 1:48 AMVisual Basic 2008 app.config errors...
Replies: 0 Hi everyone,I've a project in vb.net 2008 running, and i added log4net to it.It was an issue to sort out what to do to add logging to the project butnothing special that some google couldn't help sort out.The bigger issues where mainly what to add to app.config:<configuration>  <configSections>    <section name="log4net"type="log4net.Config.Log4NetConfiguration...
08/29/2008 3:20 AMPersisting configuration changes?
Replies: 0 I found an archived post (from 2006) in which Nicko states that log4Netdoes not provide any method of persisting dynamic configuration changes.Has anyone written any code to persist configuration changes that theywould be willing to share or at least talk about?Thanks----------------------------------------------------------------------------------Roy Chastain
08/28/2008 10:07 PMWhatever happened to asp.net pattern converters?
Replies: 2 Hello,   I’m very interested in using log4net as my companies standard logging utility.  Since our focus is primarily on developing web applications using asp.net, I’m very interested in the AspNet*PatternConverter classes that Ron started to implement back in October 2006.  Is there a new release of log4net that is coming out soon that will include them?   Or should I c...
08/27/2008 11:05 PMSmtpAppender - To addresses comma seperated, not semi-colon seperated...
Replies: 5 Am I nuts, or must multiple addresses in the To of the SmtpAppender be COMMA separated, not semicolon separated as the documentation says?   -Walden   -- Walden H Leverich III Tech Software (516) 627-3800 x3051 WaldenL@TechSoftInc.com http://www.TechSoftInc.com   Quiquid latine dictum sit altum viditur. (Whatever is said in Latin seems profound.)  
08/25/2008 7:05 AMIsDebugEnabled = false
Replies: 3 Hi All,I am new to log4net. I would to integrate this dll into my application. So Ihave done the following steps:1. I have added log4net dll into my application.2. Then insert this code        protected static readonly ILog objLog = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);        pri...
08/23/2008 2:01 AMMultiple Layouts to the same appender
Replies: 1 I have an application that contains a subsystem with its own logginginfrastructure.  I can hook into this logging system to intercept thelog messages, but the messages are already formatted.  Rather than parseand decompose these messages, I simply used a PatternLayout to match thelayout of the subsystem.However, I also need to log from my own code to the same file.  Thismeans I ne...
08/20/2008 12:38 PMdomains and log4net
Replies: 0 Hi,   This is driving me CRAZY! :( I'm doing something I see others a trying to do (via google) however I simply cannot get it to work.   I have a GUI app that uses a rollingFileAppender (it also uses a RichTextBox appender but  for the moment, I just want the file appender to work ok). Anyways, I create my Domain and point everything to the "previousVersion" directory where a...
08/18/2008 9:17 PMCan I limit the level for appender
Replies: 4 Hello, Can I limit the level for appender, for example if I want the errors to go to database and the debug calls to Debug Output. Is this possible? Thank you in advance Vlad
08/13/2008 9:43 PMConigure log4net for .net dll
Replies: 4 HiI am developing a ClassLibrary in C#(VS2008).I have refernce to log4net.dll.This DLL has only one function which will log astring using log4net.My AssemblyInfo.cs has the following entry:[assembly: log4net.Config.XmlConfigurator()]I use this above dll in a WINForms application.The problem is log4net is not logging any information.Appreciate help.--View this message in context: http://www.nabble....
08/07/2008 1:20 PMLogging from two dlls interop
Replies: 2 Hye.I wanted to trace my functions by logging some informations. So i developpedtwo dlls (.net interop) wich use log4net for logging.when i execute one of the dlls from asp page, logging is working fine. Butwhen i wanted to use both in the same page with "createObject("Dll1.object)and createObject("Dll2.object") i encounter problems.The problem is a little bitte weard, all functions with the sam...
08/07/2008 10:12 AMASP.NET, AdoNetAppender and deferred property execution
Replies: 4 Hi Everyone,I am seeing a problem here which I believe is due to deferred property execution. I have a ClientLogger which gets a property value from the HttpSession as below.    public class ClientLogger {        public override string ToString() {            string retval = "-";  &nb...
08/06/2008 9:03 PMAdding properties to a logging event
Replies: 1 I'm trying to add properties to a logging event so that the adoAppender can=pick up these properties and use them in the insert SQL statement. I've followed the example of creating a loggingEvent, but for the life of me, I can't figure out what the callStackBoundaryDeclaringType would be. Can someone help me figure out what the first parameter is to pass to the LoggingEvent constructor? Also, ...
08/05/2008 8:43 PMlog text wrap
Replies: 2 Is there a way to wrap the text in my log.  I can't find anything in theappender yet.Mackenzie FunaiDeveloper - Supporting TechnologiesComputer Sciences Corporation8616 Freeport Parkway St. 2BIrving, TX 75063469-499-8521Computer Sciences CorporationRegistered Office: 3170 Fairview Park Drive, Falls Church, Virginia 22042,USARegistered in Nevada, USA No: C-489-59-----------------------------...
07/30/2008 4:11 PMExcluding stack trace from Layout
Replies: 4 Hi,I have tried to search for an answer here and tried to understand thedocumentation but can't say I have been successful.I'm using this configuration value for the layout pattern:<layout type="log4net.Layout.PatternLayout"><conversionPattern value="%date %newline [%thread] %newline %-5level :%message %newline" /></layout>This is too much information.  I don't want the stac...
07/30/2008 5:37 AMNUnit + Log4Net Config Error
Replies: 0 When I compile my website using Visual Web Developer, it builds with noproblems. I created the DLL using the aspnet_compiler on the command lineand send that to NUnit. When I try to run my unit tests, I keep getting thiserror:log4net:ERROR XmlConfigurator: Failed to find configuration section'log4net' in the application's .config file. Check your .config file for the<log4net> and <configS...
07/29/2008 9:22 PMmore loggers vs. more appenders
Replies: 0 Hi,I need to output to distinct files the events of distinct classes in my application. I have two options:Configure a logger (with only one appender inside and with the additivity set to false) for each class.Leave a unique logger (the root logger) and add one appender to this logger for each class, then use a LoggerMatchFilter (in the appenders) to drop the logging event if the class is not the ...
07/29/2008 8:58 PMChange the logging directory at runtime
Replies: 4 Hi,I'm planning to use log4net to write events in a removable usb memory.As you can suppose I have problems setting the right path for the logging file in the removable drive, there is no warranty about the drive where the memory will be mounted each time; and the application, depending on its state, it can be using different removable memories at different times.I wonder if there is any way of se...
07/29/2008 11:20 AMChange the name of the log file
Replies: 0 Hi, My version of log4net is quite old (1.1...), and i cannot change it.I would like ton change the name of the file before using it if necessary. More precisely, i would like to change the name of the log file before calling "GetLogger".How can I? Perhaps i can use the function "SetFile", but i cannot reach it on my code. Thanks, Best Regards, Nicolas Tous vos amis dis...
07/24/2008 2:04 PMWriting large Strings (> 4000Byte) to Oracle database
Replies: 0 How can I write large text strings (larger then 4000Byte) to alog4net.Appender.AdoNetAppender.Up to 4000Byte it works fine with the dbType:String. But how can I writelarger Strings.(Mostly used for writing stack trace to a database)Can I do it over a CLOB?<appender name="AdoNetAppender_BusinessLogic"type="log4net.Appender.AdoNetAppender">  ...  <connectionType value="CoreLab.O...
07/23/2008 2:06 PMFW: AdoNetAppender: can not read custom properties from LoggingEvent using configuration file
Replies: 0 I used a extended log using example:       http://svn.apache.org/viewvc/logging/log4net/trunk/extensions/net/1.0/log4ne t.Ext.EventID/cs/src/EventIDLogImpl.cs?view=co .    I have properties InstanceId that is setted in extended log:               LoggingEvent loggingEvent = new  ...
07/20/2008 6:55 AMhow to configure a "deny stringmatch filter"
Replies: 2 the following filter: <filter type="log4net.Filter.StringMatchFilter">    <stringToMatch value="database" /></filter> Look for the substring 'database' in the message text of the event, in the case that text is found the filter is ACCEPTED and the message is logged. OK I want to configure a filter that DENY the substring 'database' (don't log th...
07/18/2008 4:18 PMRollingFileAppender not working
Replies: 2 Hi All   We have an app that uses log4net 1.2.0.22663. Its deployed on Win2K3 server, running on IIS 6.0. My log4net config look like,   <log4net debug="false">  <appender name="LogFileAppender" type="log4net.Appender.RollingFileAppender,log4net">   <param name="File" value="..\\..\\settings\\logs\\WindowsCWSLog.txt"/>   <...
07/17/2008 2:11 PMXML configuration, windows service
Replies: 2 Hi all,I'm using[assembly: log4net.Config.XmlConfigurator(ConfigFileExtension = "conflog", Watch = true)]in AssemblyInfo.csAlmost everything works fine.When I started service without config file there is no problem, simply service does not generate log.Then I add config file into service directory, again everything works fine, it starts logging.If I change config file then the configuration chan...
07/10/2008 7:05 PMAdoNetAppender.ActivateOptions not using correct connection string?
Replies: 0 I am using an adonetappender.  THe appender is defined an a separateconfig file, and I use assembly attributes to load it.In my code, early on, I get the appender and set its connection string.But when I call ActivateOptions, I get an error - it seems theappender is trying to use the old, dummy, connection string that Idefined in the config  file.  This is not what it should do.An...
07/02/2008 1:40 AMMust declare a logger in the exe?
Replies: 1 I have a dll that I recently put log4net logging into.  It  is calledby many different executables.  So I wanted to find out what is theminimum I must do so that an exe will cause the logging to happen inthe dll.Add reference to log4netAdd [assembly:log4net.Config.XmlConfigurator(ConfigFile="log4net.config",Watch=true)] to the exe's assemblyInfo.csThat should be it, right?  W...
07/01/2008 6:20 PMEventLog Appender on Win2k3 with ASP.net
Replies: 0 I haven’t seen this addressed, so here’s my problem and solution for anyone that may be interested.   I developed an app on XP and all my logs would make it into the EventLog without any issues.  I was using a new Eventlog “mylog” and the application name is “myapp”.  I knew that I had to create the log and source because asp.net didn’t have rights to create the new log.  ...
06/28/2008 12:49 AMMessage encoding
Replies: 0 Hi everyone,I have a remoting appender in place, but it looks like the encoding of the message isn't unicode or at least it doesn't support the equivalent of (char)172 because that special characters gets all weird on the server side. Is there anyway to set which encoding the logger/appender are using, specially in the case of remoting.Thanks,Yann
06/28/2008 12:33 AMDefault PatternLayout date format is not ISO8601
Replies: 0 I could find no FAQ on this so I am reporting this here.  Everyone repeats that %date{ISO8601} will produce ISO8601 format for dates.  Beyond that, the documentation says that the default form of the %date in PatternLayout is ISO8601.   This appears to be wrong based on the statement of the ISO8601 standard at http://www.w3.org/TR/NOTE-datetime.    An example should...
06/28/2008 12:03 AMParsing a log generated by a RollingFileAppender with LINQ to XML
Replies: 0 Hello, This post is not directly related to log4net. However, I have a parsing issue with one of the generated log file. I'm currently trying to parse (with LINQ to XML) a log file generated by a RollingFileAppender.It has the format as shown at the end of this post (XML fragment, undeclared namespace).I tried to load it using the XElement.Load() method. However, it throws an exception tellin...
06/27/2008 10:42 PMSpecifying log level at runtime
Replies: 3 This may be obvious, but I've missed it. (And I did try searching the mailing list archives too.) Is there any simple way to specify the level of a logging in a C# program at runtime? The logger exposes methods log.Debug, log.Error, etc., but if I have the level passed into a function as a log4net.Core.Level value, is there any way other than using a switch statement and 5 log.xxx statements to ...
06/24/2008 11:01 PMWeb and remoting
Replies: 0 Hey guys,   Anyone of you would know a good resource to setup log4net logger on a web farm and using the remoting appender to log into files on a different server?   Thanks,   yann  
06/24/2008 9:13 AMrich text box and scroll
Replies: 2 Hi Hi,   Whats the simplest way to make the content of the rich text box “selectable”. We have an awful lot of log output going to that window, all of which is needed. Ideally I’d like to freeze the window, select the text and have the RTPappender continue its writing. By default I’d temporarily set the RTB enabled == false, select the text and then set it back to true but that seems a bi...
06/21/2008 11:49 AMLog4Net failed in .net 3.5 Framework
Replies: 3 Hello,I had jus migrated my VS2003 project to VS2008 Evaluation version. I foundout that my log4net is giving me an error in which previously it didn'tcomplain.Function I called is LogManager.GetLogger(name)It gives me "TypeInitializationException was unhandled" error, with theinner exception as "The type initializer for 'log4net.helpers.LogLog' threwan exception". Go in further it mention about...
06/18/2008 9:44 PMtesting log4net
Replies: 1 Hi everyone,   I’m currently testing log4net and I can’t seem to be able to make the remoting part work properly. I am using the example remoting server app that’s provided with the log4net download and I implemented the remoting client part, mostly extracted from the remoting client example, in our project. All that running locally.   Our project is an ASP.Net web application and...
06/18/2008 10:14 AMWinforms
Replies: 6 Hi,   Could anybody tell me where is the best starting point to integrate log4net into a winforms application ?  I intend to have a UPD appender configured and have my log information displayed in a textbox. Is a textbox the best control to go with? How do I attach my log output to the control I ultimately decide upon?     Thanks for any info/replies. Have a nice day &n...
06/17/2008 5:40 PMRetry to lock log files
Replies: 0  Hello,I am using log4Net for my application.Everything is fine, except during the night where my server restart the IIS Worker process.And sometimes, the day after I don=92t have log!!A guy from Microsoft told me that during the IIS operation on the Worker Process, the old process (which locks the log file) is killed after the creation of the new process.So the new process doesn=92t have the...
06/13/2008 9:41 PMfiltering on methods
Replies: 3 This might seem like I'm a little log4net-challenged (and that may well be), but after spending some time with the message archives and Google, I could not figure this one out.  So, I turn to you lot for a hand.Is there a quick and simple way to filter messages based on the method, class, or namespace?I'm thinking of a situation where you have class A using class B in a has-a relationship, wh...
06/05/2008 12:51 PMlog4view equivalent
Replies: 4 Hi,   I'm in awe of log4net, nice one! :)  One of the reasons I digg this utility is because I discovered yesterday that we can monitor logging remotely via UDP. I configured a UDP appender for our app and I'm watching production for one of the users on my machine. Neat.   Right now I'm running with an evaluation version of log4view. I like the colour (ah the simple things in l...
06/04/2008 7:13 PMQuestion about RollingLogFileAppender
Replies: 1 Currently I have RollingLogFileAppender configured to hold a max of 20 files PER HOUR as follows:    <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">      <file value="c:\logs\MyService.log" />      <appendToFile value="true" />      <rollingStyle val...
06/04/2008 3:54 PMMultiple Loggers Stepping on Toes
Replies: 2 I'm working with a 3rd party component that is using Log4net.  Their loggeris configured programatically.My homegrown components use Log4Net as well and are configured using aseperate XML file.  As soon as I access a certain line of code in the 3rdparty component, my logger gets its Debug and Info logging disabled.I'm confused how this is happening.  I'm getting a log by totally d...
06/04/2008 1:59 PMDistinguishing logging events from multiple objects of the same type
Replies: 0 Hello,   In my application I have multiple objects of say class Foo. Each has a unique identifier. They run under a single thread (i.e. All logging events have the same thread ID). How can I distinguish logging events from these objects and the other objects called by them? i.e. If the bar() method is called on Foo 1 which in turn calls t() on a Car object, I want...
05/30/2008 2:11 PMFilter NHibernate logging
Replies: 1 Hello   Is it possible to filter out the NHibernate logs from my application logs via the XML config file.   The logging is working great but I am finding that the inclusion of the NHibernate logs is way to verbose for my needs and that the information I am really interested in is being ‘lost’ (or rather harder to find) in the amount of information being logged.   If anyone ...
05/29/2008 11:58 PMroot level logger using other logger level
Replies: 2 We have multiple loggers set up for various services that make up our system.  I think I have the service configured to log ERRORs (and FATAL) to one file for all code, then qualified a couple separate thread based services to log debug type information to other files.  Instead I see DigitalBridgeTrafficControl INFO message in trafficControl.log, where I thought should ONLY see ERROR and...
05/23/2008 7:27 AMbypassing the IsEnabledFor check
Replies: 0 Hi, I've got a question.I'm currently wrapping the LogManager class and the resulting ILog togain some custom behavior.I would like to be able to flag certain logging events as "important" byproviding overloads of the Debug/Info/etc methods.  The important eventswould then get logged -- regardless of the configured level of thelogger.  Do you have any advice on how to do this?  Th...
05/19/2008 10:53 PMHow to log from multiple projects using log4net?
Replies: 1 Hello,I'm just starting with log4net and want to know how to log to the same logfrom several projects in a solution.The way i use it in a single project is very easy. Just create a configfile, create ILog object and log away, but i have no idea how that wholething works when i have many projects that need to log to the same file.Another question is can i make the projects share log4net singlecon...
05/19/2008 1:23 PMhow to log to differnent textfiles?
Replies: 9 Hello!I'm quite new in using log4net. :-)And perhaps you have a quick and easy solution for my problem.I have an windows application which can be started more than once.Inside the config file I can set the logfile and path.But when I start my application more than once, I receive a "file inuse" exception.Is it possible to set the logfile path at runtime?Thank you for your help.best regards,Mad
05/16/2008 5:18 PMConfiguration of Log4net with Visual Studio 2008 unit testing
Replies: 1 Does anyone know how to use log4net.config files with Visual Studio 2008 unit testing?   I have a test project with a log4net.config file as part of the project, properties set to Content and Copy always, which diligently copies the config file to the bin\release or bin\debug folders on build. In the test class the [ClassInitialize] method includes this line:   log4net.Config.XmlCo...
05/16/2008 4:10 PMLog4net viewer Log4View 2.2.0.6 released
Replies: 1 I am glad to announce that Log4View 2.2.0.6 has been released. Log4View is a powerful and comfortable viewer for Log4net output. Key Features: * Reads output of RollingFileAppenders, UdpAppenders and a special TcpAppender(!) * Can easily filters huge log files to focus on the current point of interest * Multiple open logs * Dynamically growing logger tree shows all known loggers * Typ...
05/15/2008 6:34 PMlog4net stops logging for apparently no reason
Replies: 3 Hi,I was very happy with log4net. Kudos to the developers. However, oneday, it inexplicably and silently stopped logging.  We are using log4netfor our internal SharePoint applications, in case this makes any difference.Here are the relevant parts of my web. config (this has changed a bitsince I've been mucking about with it):<configuration>  <configSections>  &nbs...
05/13/2008 6:51 PMCannot log using Log4Net in a web app
Replies: 2 I have a web application written using .NET framework 2.0 and VB.net. I amusing log4net to log errors. So far I havent been successful in doing soI have added log4net references to my application, modified the web.config(I have even tried writing a new config file but didnt help) with therelevant code and added code in the code behind for logging  but this doesntwork. Do I have to write ext...
05/13/2008 9:57 AMCombining log4j and log4net
Replies: 1 Hi, We have an application set consisting of both java and .net applications. Is it possible to have separate log4j and log4net instrumented applications simultaniously writing to the same text log file or to the ip port ? /Geir ************************************************************** The contents of this e-mail message and any attachments are confidential and are intended solely for t...
05/12/2008 5:26 PMProblem getting Log4net to work
Replies: 7 Can anybody spot what I am doing wrong? I'm probably doing something stupid, but I've been banging my head against this for a few days and am getting no further:I have a solution comprising two projects, a client app and a logger project. The logger project encapsulates calls to log4net. It has a line in its AssemblyInfo file        [assembly: log4net.Config.XmlC...
05/09/2008 2:49 AMlogging additional message-specific data with AdoNetAppender
Replies: 5 Hi, we've been using log4net for a few months now, and I've been on this list for about the same.  I have a design question.What would be the "correct" way to do the following?We'd like to log to a database using the AdoNetAppender.  From our code, when we call things like log.Debug, log.Info, log.Warn, etc. we'd like to be able to pass not just a "message" but also things like a local...
05/07/2008 6:31 PMForcing a rollover
Replies: 0 I would like to force a rollover action on a RolloverFileAppender but I cannot see an API to do this.   I want to do this at the point I archive the log file (so I don’t kill the file-in-use).  So how does one force a rollover? Eric Chamberlain Software Engineer  
05/05/2008 6:51 PMFW: Date Pattern question on RollingFileAppender
Replies: 0 What is the correct syntax for the datePattern to keep the .log extension on the rolled over files, such as Mylog.log Mylog.2008-02.log Mylog.2008-03.log Mylog.2008-04.log   I don't want the date of the file to be the last extension. I have tried the following but get an error: System.NotSupportedException: The given path's format is not supported.   at System.Security.Util....
05/05/2008 9:31 AMlog4net configuration withtou Xml file
Replies: 9 Hello Everyone,       I need to be able to configure log4net without the XmlConfigurator, that is directly from my code.     I am aware of the BasicConfigurator but one appender is not enough for me.       I would like to be able to create some new appenders, remove (or disable) them and change their     log threshold at r...
05/02/2008 11:00 PMThrottling/Rollup feature in EventLogAppender
Replies: 3 Is there a Throttling feature available or planned in EventLogAppender. If we log to event log a message that could potentially be logged at frequency of one per incoming request to my web application, it could flood the event log with millions of messages if/when things go wrong.  If there was a = way to roll them up every x seconds into a single event log message (with a count of how man...
04/30/2008 3:05 PMSmtpAppender not working on 3rd party hosting provider
Replies: 7 I'm trying to figure out a situation where the SmtpAppender in my ASP.NET3.5 application works properly on my development machine, but not on GoDaddyshared hosting.This might be easier, except that I can't see the output whenlog4net.Internal.Debug = true at GoDaddy, because we have no access to, andcannot add a listener for the System.Diagnostics output.Some points:- This works on my development...
04/28/2008 5:52 PMlog4net Memory Leak
Replies: 2 We are currently experiencing a reproducible memory leak in a C# .NET Web Service. When we analyze the memory using WinDBG, are are able to find loads and loads of strings containing the information that we are logging in our Web Service. So each time we write to the log, that string is stuck in the memory for our aspnet_wp process. We have verified this by dumping the actual string objects and fi...
04/25/2008 9:42 PMAppending log entries to Visual Studio Team Edition unit test results.
Replies: 1 I'm trying append my log entries to the test results from a unit test inVSTS. Generally, anytime you call Console.WriteLine from within your unittest, the results are written to the console. So, I figured if you use theappender I have below, the log results would show up there as well. I'mguessing the streams are redirected somehow...and I'm not sure how to remedythat. Has anyone tried to do thi...
04/24/2008 6:12 PMRich text box appender
Replies: 0 I've often had a need for an appender that would write to a Windows Forms text box. I suppose the reason that none is included in log4net is the required reference to System.Windows.Forms that is not shared by every .NET implementation.   I found several text box appenders for older versions of log4net lying about the web. I've taken ideas from them, updated bits of them and wrote an appe...
04/23/2008 2:48 PMMoving log4net config out of App.config
Replies: 2 I need to move log4net configuration from app.config file and i have tryedthe following :app.config file :<?xml version="1.0" encoding="utf-8" ?><configuration>  <appSettings>    <add key="Log4NetConfiguration" value="log4net.config" />  </appSettings></configuration>log4net.config file:<log4net>     &nbs...
04/23/2008 9:06 AMHow to print a tabulator without %tabulator ?
Replies: 3 Hello,there is a very simple thing i dont know how to do: tabulator in conversionPattern value.There is a %newline, but no %tabulator. Is it possible to get the tabulator someway?Thank you,Alexander Connect to the next generation of MSN Messenger  Get it now!
04/22/2008 5:01 PMLog4Net and Vista logo certification
Replies: 1 Hello !We are going to submit some of our products to the Vista Logo program.These products are using log4net for logging stuff. A test case in the vista logo certification specifies that all delivered dlls must be signed.The version of log4net we have is not currently signed. Is there a way to get a signed dll of your logging solution ?Thank you very much******************************************...
04/22/2008 11:32 AMCounting number of Errors or Emails sent
Replies: 2 Hi there,I got a task that SHOULD be quite easy but I did not find any solution yet.Maybe the reason is that google finds a lot of stuff when searching forcount... (impossible to get a non-sql-related site :-D)But to my problem:log4net works fine, sending emails when an Error occurs. But sometimes ithappens that because of a major bug thousands of Mails are sent because ofthousands of error mess...
04/17/2008 5:57 PMProblem with File name in RollingFileAppender
Replies: 0 Hi everyone, I’m newbie in Log4Net. I have studied Log4Net in few days and I have a problem with it. I’m working on multi-portal framework, which store many sites. Each site has an ID (SiteId), I want logging each site in a folder named = ID of this site. For example, ManageUser.log for Site with siteid=123 will be stored in folder Portal_Logs\123.   |- Potal_Logs\ |---\123 for si...
04/17/2008 8:26 AMlog4net.Layout.XmlLayout : bad format
Replies: 3 Hi ! I use log4net.   <log4net debug="false">     <appender name="LogFileAppenderErreurs" type="log4net.Appender.RollingFileAppender">       <file value="GestionErreurs\Logs\Erreurs" />       <appendToFile value="true" />       <rollingStyle value="Date" /> &n...
04/12/2008 7:17 PMFaster %date{yyyy-MM-dd hh:mm:ss tt} pattern converter
Replies: 1 This is a faster pattern converter for the "yyyy-MM-dd hh:mm:ss tt" pattern. I use this primarily with my NHibernate logger in DEBUG mode because I want to see what NHibernate is doing but I don't necessarily care about timings down to the millisecond when its writing out its generated sql and building objects. When I use this pattern converter my app doesn't feel slow when NHibenrate DEBUG logg...
04/10/2008 3:26 PMProblems with log4net Rolling File Appender
Replies: 4 Hello! We use log4net in a linux environment (OpenSuSE 10.2) with Mono. We utilize a RollingFileAppender which appearantly puts 3 or so Bytes (Hex Values: EF BB BF) in Front of each file. These characters interfere with our Software processing these logfiles. Under .NET we don't have this problem. Question now is if this is a known Problem which has a fix or if we have to modify our processing sof...
04/02/2008 4:10 PMSmtpAppender To: addresses ...
Replies: 0 Log4net Users,   I am using the SmtpAppender.  The documentation explains that the <to> field can contain a list of e-mail addresses separated by semi-colons.  However, doing so, raises an exception in log4net:   <appender name="SmtpAppender" type="log4net.Appender.SmtpAppender">       <to value="xxx@yyy.com;aaa@bbb.net" /> &nb...
03/27/2008 4:47 PMSystem.Reflection.MethodBase.GetCurrentMethod ()' threw an exception of type 'System.ArSystem.Reflection.MethodBase
Replies: 1 I am trying to use log4net in next manner :LogException(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.ToString(),ex)and i am getting System.Reflection.MethodBase.GetCurrentMethod ()' threw anexception of type 'System.ArSystem.Reflection.MethodBase somebody help me .--View this message in context: http://www.nabble.com/System.Reflection.MethodBase.GetCurrentMethod-%28%29%27-threw-...
03/25/2008 3:41 PMLogging framework for classic ASP
Replies: 1 Hi,   Now that we are talking about logging frameworks for .NET, do we have a recognised way of logging in classic ASP? I have an application written in classic ASP without any logging and I would like to implement it afresh. Would be great if you can share your thoughts on how to do this.   Thanks Srini 
03/25/2008 10:34 AMDeliveryMethod in log4net
Replies: 1 Hello, can I config the DeliveryMethod property of SmtpClient object that sends mail in smtpAppender?? tnx
03/19/2008 9:34 AMroutnig logs files to cpecific folder
Replies: 1 I want the log4net write logs files to cpecific folder ,not to currentapplication folder--View this message in context: http://www.nabble.com/routnig-logs-files-to-cpecific-folder-tp16140319p16140319.htmlSent from the Log4net - Users mailing list archive at Nabble.com.
03/19/2008 9:10 AMPreventing log4net bee recognize as spam
Replies: 0 Hello everyone i have some client application and i want to use log4net withws or pop3 appender the problem is that if my application will send logsfrom client machine it will be recognize as spam.So what should i do inorder to resolve this problem--View this message in context: http://www.nabble.com/Preventing-log4net-bee-recognize-as-spam-tp16139714p16139714.htmlSent from the Log4net - Users m...
03/19/2008 1:53 AMLog4Net stopping
Replies: 18 We are using log4net to do logging in a .Net 2.0 application. We have used it successfully for about 6 months. Then today, we discovered that sometimes it just stops working. It still goes through the statements to write to the log, but it doesn’t actually write anything anywhere. The users have to close our application and re-open it to start the logging off again.   The action that hap...
03/15/2008 2:39 AMASP.NET 2.0 C# - Logging issues with multi layer app.
Replies: 2 Hello all,Hope this is an easy stuff to solve due to a newbies misconfig step orsomething.lemme introduce better my problemi'm developing a 2-tier app.tier 1 : Web Sitetier 2: Data Access Layeri have the log4net config part on the web.config it self.here it is :================================================================================<configuration>...<configSections>  ...
03/13/2008 9:09 PMIs there a log reloaded event?
Replies: 1 We have converted some of our legacy unmanaged code to use log4net through wrapper classes.  For efficiency, we cache the various IsEnabled properties that our unmanaged code uses. Because it is cached, we need to know when XmlConfigurator reloads a changed configuration file so that we can clear our cache.I have searched the SDK docs, but I couldn't find any events that I could subscribe t...
03/12/2008 11:17 PMLog4Net and Powershell
Replies: 2 I was wondering if there are any users out there using Log4Net with Powershell successfully?   If so ,I’d be interested in seeing your sample code.    Thanks
03/12/2008 6:09 PMlogging from web service and a web page
Replies: 2 I have had a web service logging for a while now and it works great (I’ll call it ws).  The log4net.dll runs in the standard aspnet_wp.exe and logs using the rollingfileappender with minimal lock.                   <lockingModel type="log4net.Appender.FileAppender+MinimalLock" />    I’ve recently...
03/10/2008 3:05 AMUsage guide for Vista?
Replies: 5 I can't seem to write a log file anywhere on Vista. Is there any guide forusing log4net on vista?I thought this setting in log4net.config was going to save me, but itdoesn't seem to write a file.<file value="${ALLUSERSPROFILE}\Application Data\MyStuff\logs\MyLog.log" />--View this message in context: http://www.nabble.com/Usage-guide-for-Vista--tp15949615p15949615.htmlSent from the Log4net...
03/07/2008 5:44 PMReusable layouts ...
Replies: 1 Is there a way in a log4net configuration file to specify a layout pattern and then reference that pattern from multiple appenders.  In the following config file snippet, the same layout specification is used by two different appenders.  Is there a way to specify the pattern just once and reference that patter by each of the two appenders?   Thanks,   Ken Parrish Gomez, ...
03/04/2008 5:20 AMrollingfileappender - repetition of file name suffix
Replies: 1 Hi,I've searched around the documentation and on the web but couldn't findreference to this behavior (though the recent thread called "log4net andIIS problems" seems indirectly related.)I'm using a RollingFileAppender with a MinimalLock and simple datepattern for the file name.  When I deploy my application, I get severalfiles of the following form in my log directory (at bottom is theconfi...
03/03/2008 10:56 AMSQL Appender and date time format
Replies: 2 Hi, I'm trying to use the SQL Appender with the RC version. I configured access to my log table as advised and I have no SQL Connection errors. I also have more then 300 entries in my log table created in the last hour. The problem is that no entries are displayed in the Summary section. I did a trace and found the following script being executed (just an excerpt): ............. In...
02/29/2008 9:11 PMlog4net now included in Fedora 8 onwards
Replies: 0 Hi Folks,Just a quick word to say that I've packaged log4net for the Fedoraproject and it is now available in Fedora 8 onwards (Fedora 7 monokeeps segfaulting and is approaching EOL so will probably miss thisout)Regards--Christopher Brownhttp://www.chruz.com
02/29/2008 6:33 AMLogging issues
Replies: 0 Hi,     I am using RollingFileAppender and LeveMatchFilter (filters) to log different types of logs into different files. I am able to log Info log into info_<date>.log file, debug log into debug_<date>.log file and error into error_<date>.log But due to the default LockingModelBase (as exclusive lock) of RollingFileAppender, I'm getting the error: log4net: ERROR [Rolli...
02/27/2008 7:02 PMRe: AW: WMI-Appender question
Replies: 2 Can you post a non-log4net snippet showing how you're posting messages to WMI in non-admin mode? If you can do it outside of log4net, it should be possible to convert the code to work within log4net. If you can't get it to work outside of log4net, then you'll need to solve that issue first.
02/27/2008 5:49 PMProprieraty Layout Problem
Replies: 5 Hi!I have one question again :D!In my project (for Compact .NET Framework), we need implement a specified layout to logger. First, we included the log4net library in project and we extended the Xml like below:using System;using System.Collections.Generic;using System.Text;using log4net;using log4net.Util;using log4net.Core;namespace MyProject.Log{    public class MyXMLLayout : log4n...
02/26/2008 2:14 PMlog4net and IIS problems
Replies: 16 Hi   I am using log4net on my asp.net web page hosted at an IIS server. This seems to work just fine until I do some changes in the source. Since asp.net runs as a shadow copy, changes will be compiled on the next request after the change was made. I guess this causes the log manager to duplicate itself, and the second one will not have write access to the log files. Since the old app dom...
02/25/2008 3:27 AMPossible thread sync issue in XmlLayoutBase:Format()
Replies: 0 Hi Everyone,I ran across a problem with XmlLayoutSchemaLog4j today...I was getting a NullReferenceException in TextWriterAdapter::Write() after logging several events from asynchronous socket IO (multiple threads).The exception failed occured because the internal m_writer of TextWriterAdapter was null. The only place I could see m_writer being set to null prior to the m_protectCloseTextWriter was ...
02/22/2008 6:36 PMProblem CF + RollingFileAppender + Flush
Replies: 6 Hi!We are developing an application for compact .NET framework 2.0. We need log events and view and real time. We configured the app.config file like presented below:<?xml version="1.0" encoding="utf-8" ?><configuration>  <log4net>    <appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">      <file ...
02/21/2008 11:30 AMLogging into multiple log files
Replies: 3 Hi, I have requirement, where-in I have to log different types of logs into different files.Eg: Info logs should go into AppInfo.log Debug logs should go into AppDebug.log Error logs should go into ErrDebug.logI am able to log into all these files. But the issue is all the types of logs are present in all the log files.AppInfo.log is having info, debug and error logs. But I want only ...
02/21/2008 7:47 AMSmtpAppender subject
Replies: 1 Hi   I have a question about the SmtpAppender class. I want to have a dynamic subject. It should contain the log level, and the first line of the message.   For example: log.Error(“My error message”) gives a subject like: “ERROR My error message”   log.Fatal(“My fatal message\nHello world”) gives a subject like: “FATAL My fatal message”     Is this possible? B...
02/20/2008 11:06 PMProperties at the Logger level.
Replies: 0 Is it possible to have properties associated at the logger level. I noticed they are available in the repository but not implemented in LoggingEvent.CreateCompositeProperties(). Basically, I have a windows service that has several listening sockets (implemented with asynchronous callbacks). I would like to track and log session activity on the server for each of these listening sockets with log4n...
02/20/2008 4:06 PMFormatting the Logged Exceptions
Replies: 0 Hello,i have 1 specific Exception Type where i am not happy on how this Exceptionis logged.It logs Message + StackTrace - but i want to give some AdditionalInformation.I found  log4net.ObjectRenderer.IObjectRenderer for rendering objects,in this case i want to define how Exceptions are rendered.--View this message in context: http://www.nabble.com/Formatting-the-Logged-Exceptions-tp15590450...
02/20/2008 2:01 PMlog4net .NET 1.1 problem
Replies: 2 Hi, I am trying to deploy an application that uses log4net.dll version 1.2.0.22663. The .NET FW that I use is 1.1 and running against IIS 6.0 on Windows 2003. The trouble is there is no log file being created when I run the application against 1.1. However, if I switch the application to use 2.0, everything is fine. Due to circumstances, I cannot switch my app to 2.0 on production. I would ...
02/19/2008 9:21 AMWMI-Appender question
Replies: 3 I am experimenting with the WMI Appender and I found it to be just whatI want. The only issue that needs to be resolved, is how to fire eventswhen the application doesn't run as admin. Any solutions?thanks,andreas
02/18/2008 6:21 PMLogging with Oracle client for .net
Replies: 2 Hi,   I’m trying to log with the Oracle Data provider for .net framework, v9.2   I followed the tutorial here : http://logging.apache.org/log4net/release/config-examples.html (Oracle 9i)   My connection type is : <connectionType value="Oracle.DataAccess.Client.OracleConnection, Oracle.DataAccess, Version=9.2.0.401, Culture=neutral, PublicKeyToken=89b483f429c47342" /> ...
02/18/2008 5:57 PM