| 08/06/2009 12:15 AM | relative path for config file |
| Replies: 7 |
Hi,
I use log4net in a C# web application and am having problems configuring it to use a relative path to point to the location of a configuration file external to web.config.
In web.config, if I use
<add key="log4net.Config.File" value="C:\somePath\log4net.config" />
all works fine. However, I would like to avoid having to hard-code the physical ... |
| 08/05/2009 5:12 PM | Programatically specify output file. |
| Replies: 2 |
Hi,is it possible to confige a RollingFileAppender in the configfile and specify the output file programatically?My usecase is that I want to log in different files (e.g. agent.5.out, agent.4.out, ...) but the appender which will be used should be configured in the config file.Any Suggentions?Thanks.Bernhard
See all the ways you can stay connected to friends and family |
| 08/04/2009 10:46 PM | stop receieving emails |
| Replies: 2 |
Hello,
how can i stop receiving emails when users ask questions on the log4net forums?
Thanks,
Ghinwa |
| 08/04/2009 9:51 PM | Mixed Logs |
| Replies: 7 |
Hi Guys,
I’ve got an application that uses log4net everywhere and logs a lot of things. Yesterday I leave running some hardware stress tests all the night, and today I found something weird in the logs.
The app ran near 1000 test, and 2 of them failed, but just before the failed test it logged something like this:
2009-08-04 04:42:41,846 [1] DEBUG XXX.Communications.Messages.R... |
| 08/04/2009 8:38 PM | Log in more than 1 log desination for different assemblies. |
| Replies: 4 |
Hi,I am new to log4net and just starting reading some documentation about it.We need to see if it would be a suitable logging solution for ourapplications.Our product (like most of them) uses a number of assemblies. I was wonderingif it would be possible for each assembly to log in its own log file (or anyother destination) even if they are loaded in the same application domain.For example consi... |
| 08/03/2009 7:12 PM | Logging with EventLogAppender in ASP.Net 2.0 |
| Replies: 0 |
Hello there,I am trying to setup logging in my ASP.Net 2.0 application usingEventLogAppenderas mentioned in the link:http://geekswithblogs.net/TimH/archive/2006/04/13/75063.aspxI have gone through all the steps at above post except # 4, which says -Register your app with the event log. You can do this either with aninstaller or manually (ie code it using theSystem.Diagnostics.EventLog.Crea... |
| 07/31/2009 10:15 PM | Defer file creation |
| Replies: 12 |
Hi Everbody,
I’m looking for a way to defer the creation of the log file until the first entry is logged. I want to use log4net for writing protocols for jobs that can be executed in my application. With my current configuration the file is created during startup which makes no sense if the job doesn’t run.
My current configuration:
 ... |
| 07/30/2009 10:14 PM | Rollingfileappender doesn't roll over |
| Replies: 2 |
Hello to all, I have interesting problem with RollingFileAppender in ASP.Net webservice. When webservice run on IIS on Windows XP, all works well, log file is rolled over days.
But when it was deployed to IIS running on the Windows 2003 Server, logging still work, but…. Log file is not rolled over, messages are still written into single file !
Has anybody similar experience or (better) knowledge... |
| 07/27/2009 11:15 PM | Location of logs when FileAppender can't open a file |
| Replies: 1 |
Hi.
Suppose that a FileAppender in use is set to log to a directory for which it has no write or create rights, what will it do, where will the log files be created?
We have a situation where, depending on the user, the process that owns the log4net logger instance will not be able to write to the designated directory for the FileAppender. In later versions of the application, ... |
| 07/19/2009 4:53 AM | Wrapping Log4Net |
| Replies: 17 |
Hi forum,I would like to use log4net in a large .net development. because i have therequirement to prepare a potential replacement of the log4net framework e.g.against ms-enterprise library or against a newer version of log4net, i wouldlike to wrap this. My way to do it is straight forward:A single assembly references the log4net framework, offes the ILog andLogManager classes, and all other pro... |
| 07/17/2009 10:12 PM | Output to multiple log files |
| Replies: 0 |
I have a process that imports data to our data system. I need to create aseperate logfile for each import. Currently I'm naming the logfile with adate time stamp plus the import description e.g. 200907171509Product.log.I'm using the RollingFileAppender.Currently I check if the appender exists and if not I create one and add itto the Logger. My appenders are named based on the import type (e.g Pr... |
| 07/17/2009 3:08 PM | RE: Error while sending Mail to smtp.gmail.com |
| Replies: 17 |
à I’m able to successfully send mail using .net code through gmail by enabling SSL.
But using log4net its given error:
My Code in app.config file:
<appender name="SmtpAppender" type="log4net.Appender.SmtpAppender">
<to value="myusername@gmail.com" />
<from value=" m... |
| 07/17/2009 2:42 AM | Failed to find config section - Only after Environment.Exit() |
| Replies: 4 |
I have a .net application using log4net that works fine up until the application exits using Environment.Exit(). At that point I get the following error message:
“log4net:ERROR XmlConfigurator: Failed to find configuration section 'log4net' in the application's .config file. Check your .config file for the <log4net> and <configSections> elements. The configuration section shou... |
| 07/16/2009 4:36 AM | log4net within Excel RTD/UDF |
| Replies: 2 |
Hi, I am using C# to write an Excel RTD (real-time data) and UDF (user defined function) and having trouble figuring out how I can get log4net to configure itself. My understanding is that it uses the AppDomain.CurrentDomain.BaseDirectory to look for the configuration file. This is the Excel installation directory. I however do not install my application into that directory and d... |
| 07/14/2009 2:00 PM | Re: RollingFileAppender destination failure. |
| Replies: 0 |
Hello user list,couldn't find an answer to this type of problem.what is the best approach to reroute logs from rollingfileappender toanother one if it's destination becomes unreachable?--Sincerely,Alexander N. |
| 07/08/2009 9:49 PM | Checking configuration file for syntax errors? |
| Replies: 0 |
Hello,I wonder if there's a way to check the syntax of an XML configuration file. I'm aware of the Repository.Configured-property but I'd like to check the configuration file before applying it.Background:When using the XmlConfiguratorAttribute I want to utilize a static method which checks the denoted file. If the file is eroneous the method will return the path to a fallback config file which ... |
| 06/26/2009 11:02 PM | AUTO: Stephen Murtagh is out of the office. (returning 06/07/2009) |
| Replies: 0 |
I am out of the office until 06/07/2009.I will respond to your message when I return.If you are experiencing a problem that requires urgent assistance pleasecontact the IT Service Desk (6634).Note: This is an automated response to your message "Problem using aConsoleAppender in a Windows Form application" sent on 26/06/2009 14:21:31.This is the only notification you will receive while this... |
| 06/26/2009 9:21 PM | Problem using a ConsoleAppender in a Windows Form application |
| Replies: 6 |
Hi !I'm using log4net 1.2.10.0 and .NET 2.0I wrote a Windows Form application and I want to be able to log debug messages in a ColoredConsoleAppender (or whatever type of Console appender).If I compile my application as a Console Application, this works fine... If I compile it as a Windows Forms application, then I understand that no console is attached to my application, fair enough..In this case... |
| 06/23/2009 2:22 PM | How to know current log file name while using log4net RollingfileAppender |
| Replies: 0 |
I am using Log4Net library in my wcf service and logging usingRollingLogFileAppender.I am not able to find way to know what is the log file name which is beingused when logs are written using RollingLogFileAppender.I am creating log file path/name using -<file type="log4net.Util.PatternString" value ="\\nt1\temp\%env{COMPUTERNAME}_[%processid].log">I want to use this filename generated on ... |
| 06/22/2009 11:38 PM | Using log4net to write to remote windows event log |
| Replies: 3 |
Hello,I'm using log4net to log/trace an application and I would like to have cert= ain errors ending up in the the event log from another computer. Is there a way to do this? (RemoteSyslogAppender?)It seems that I could do around the tree and use a ForwardingAppender which together with a application acting as server on the remote computer would could write this to the event log, but it looks a ... |
| 06/22/2009 9:09 PM | How to make a part of log message uppercase |
| Replies: 2 |
Hello,I'm using AdoNetAppender to log messages. I've added %property{log4net:HostName} conversion pattern to the message parameter.<parameter> <parameterName value="@message"/> <dbType value="String"/> <size value="4000"/> <layout type="log4net.Layout.P... |
| 06/20/2009 1:13 AM | Getting AdoNetAppender parameters using Log4Net API |
| Replies: 1 |
Hello,I've defined some extra parameters for AdoNetAppender in log4net config file. Everything works fine.Here is one of my extra parameters defined: <parameter> <parameterName value="@cachetid"/> <dbType value="String"/> <size value="36"/> &nbs... |
| 06/20/2009 12:56 AM | RE: Mystery concerning configuration SOLVED. |
| Replies: 2 |
I have discovered the source of the problem. We had split out the <log4net> configuration from the web.config but with a redirection left inside the web.config of the form:
<log4net file="other_config_directory/log4net.config" />
The file at the end was of the correct syntax and could be used by log4net but only to the extent that we used the <p... |
| 06/19/2009 10:24 PM | EventLog Fun Continued. |
| Replies: 1 |
Hi All,I'm still at a total loss as to how to get log4net successfully writingto a custom event log, writing to the Application event log is workingexactly as expected.I have started using the IEventIDLog extension in order to pass overevent IDs to the log messages to see if this makes any difference.I've looked over google a lot over the last couple of days and havetried everything I have found... |
| 06/19/2009 5:50 PM | Event Log Weirdness. |
| Replies: 4 |
Hi All,I'm just looking into an odd issue. I have an EventLogAppender beingconfigured in C#. If I set this up to append to the "Application" logall is fine.However, when I ask it to create a custom event log called LogTest itsnot working as expected.Now the obvious thing is that the process doesn't have permissions ...it does. It created the new LogTest event log without proble... |
| 06/19/2009 6:41 AM | Mystery concerning configuration |
| Replies: 1 |
Greetings all,
I have an appender which works fine if specified with generic XML but not when specified with conventional log4net terms in the configuration.
Examples should help:
The following works:
<appender name="LogServiceAppender"
type="log4net.Appender.RollingFileAppender">... |
| 06/18/2009 8:27 PM | Log4net: context only for exception |
| Replies: 1 |
HiI also posted this question athttp://stackoverflow.com/questions/1011730/log4net-context-only-for-exceptionhttp://stackoverflow.com/questions/1011730/log4net-context-only-for-exception. But I think this might be a better place. Here is the question:I'm looking for a way to collect a set of data, that will only be used fordebugging, the data should only be logged if I log an exception. AFAIK it... |
| 06/17/2009 2:24 PM | Please release a version that is officially endorsed by the ASF |
| Replies: 1 |
I'm avocating the use of log4net where I work and phases like "notofficially endorsed" and incubation get translated to beta and unstable.If nobody is willing to actually release an updated version (as it seemsfrom the mailing list) how about log4net-1.2.10.1.zip and just includingthe 1.2.10 dll and version 1.2.10.1 readme file that says "now endorsed"....Michael SimmonsAnalyst ProgrammerMichael... |
| 06/16/2009 5:21 AM | Deleting old logs |
| Replies: 7 |
Hi,I am trying to just have the latest 2 log files of my application, thus Ihave configured the log4net as follows:<log4net> <appender name="RollingFile"type="log4net.Appender.RollingFileAppender"> <file value="d:\netapps\logfiles\MyApp.log" /> <appendToFile value="true" /> &nbs... |
| 06/15/2009 11:25 PM | Using AdoNetAppender |
| Replies: 18 |
Hi All,I've spent about 4 hours today trying to get this working and havetotally failed so far.I can't even really find much info on how to configure this purely inCode. In fact there is precious little I can find on the net in fact.Here is the code I'm using the set up the AdoNetAppender in my app:public static void ConfigureDatabaseAppender(string connString){PatternLayout layout = GetDe... |
| 06/15/2009 8:42 PM | Redirecting Some Log Entries |
| Replies: 2 |
Hi All,
I'm just creating a wrapper for my use. The question I have is about redirecting or temporarily turning off appenders.
Say I have two appenders added to the over all config. One is a simple file appender whilst the other is an Event log appender.
Most of the time I just want things to go to the file appender and on some occasions I want logs to just g... |
| 06/15/2009 8:26 PM | How rollingFileAppender works? |
| Replies: 0 |
Hello, I am using log4net for a couple years, but it still have some secrets… I'm using RollingFileAppender in my app and I'd like to limit number of stored log files - I wan't to keep logs for the last 10 days, any older log should be deleted.
First idea was to call once a day simple procedure, which finds all log files according its name and deletes all, which _creation_ date is older than 10 d... |
| 06/12/2009 1:15 AM | Using thread context data from a filter to decide whether to append... |
| Replies: 1 |
Hi all. I’d like to know if I’m doing this correctly. I want to set a value in ThreadContext.Properties from application code. I then want some appenders to log or not log based on this contextual information. I believe the right way to do this is to create a class that implements IFilter and apply some filters to the these appenders.
So far I’ve created my filte... |
| 06/05/2009 11:01 PM | How do I use dynamic boolean values on RollingFileAppender |
| Replies: 12 |
I have ran into a "small" brick wall. Hoping that I can find a couple of log4net guru's here. My situation.In trying to make my logging as configurable as possible in my application, I have been tinkering with trying to set the boolean values for appendToFile and staticLogFileName as dynamic values. These have a default value (currently stored in the My.Settings metadata). &nbs... |
| 05/21/2009 6:02 AM | Key cannot be null error |
| Replies: 7 |
Hello,
Could someone explain to me what the following error means please?
log4net:ERROR [AdoNetAppender] Could not open database connection []System.ArgumentNullException: Key cannot be null.Parameter name: key
I encounter this error when trying to log to my database. The rows are updated, but I get this message pop up on the console. I dont know how busy this list is,... |
| 05/20/2009 11:57 PM | Strange Syste.ArgumentNullException |
| Replies: 1 |
Hi All,
I am getting a strange System.ArgumentNullException when using a AdoNetAppender.
The message I am passing is is caught and logged to the DB, but on the console I am getting the following error:
log4net:ERROR [AdoNetAppender] Could not open database connection []System.ArgumentNullException: Key cannot be null.Parameter name: key at System.C... |
| 05/20/2009 11:55 PM | Filtering events - all EXCEPT ... |
| Replies: 2 |
I have a server deployed which is generating ‘false positive’ log4net ERROR events. These should be changed to be WARN events so that they can be filtered out by a configuration change. Unfortunately, deploying a patch to the server at this point in time means moving heaven and earth to get the support needed for QA and deployment.
What I would like to do is to devise a chan... |
| 05/20/2009 5:09 AM | Log not logging in custom filter |
| Replies: 2 |
I'm writing a custom filter (inherits from FilterSkeleton) and I want to log
errors inside the filter. The problem is that any log events created inside
the filter is not getting logged. Is there a special restriction that log
events cannot be created this far down inside the loggin pipeline?
public override FilterDecision Decide(LoggingEvent loggingEvent)
{
&nb... |
| 05/19/2009 11:24 PM | SystemNullReferenceException usgin log4net with MySql |
| Replies: 0 |
Hi There,
I have been working with log4net now for a few weeks, after some work I have managed to use the ADONetAppender to log to a MySQL DB. However, although I can get messages into my DB, I am getting the following error on my console:
log4net:ERROR [AdoNetAppender] Could not open database connection []System.ArgumentNullException: Key cannot be null.Parameter name: k... |
| 05/19/2009 5:13 AM | Remote Appender |
| Replies: 5 |
Greetings,I have been using log4net for a while and I think it rocks! It has allowedme to focus on the business functionality and have provided a very reliableand elegant platform for logging. So thanks to the people who maintain it.I have been trying all day to get the remote appender to work. I have lookedfor examples but didn't find anything other than going into the source codeand checking o... |
| 05/11/2009 10:19 PM | Number of rollbackfiles does not have the desired effect when the file name inc the process id |
| Replies: 0 |
Hi,I need to configure the settings so that the max number of files will be 10and the max file size will be 100KB.Whenever I am not including the process id in my file name the machanismworks fine. The problem starts when I have many logs with different processids (closed by closing and opening the application).The "MaxSizeRollBackups" & "maximumFileSize" properties have an effect onlyif the... |
| 05/05/2009 5:42 PM | Re: Different pattern layout based on Level |
| Replies: 0 |
Hi,
my goal is to have different pattern layout based on the Level of the Logger. This cause I'd want to include line, method name etc. only if debug level is on.
Cause the appender section can include only one child element of type layout, I'm trying using two different appenders:
<appender name="RollingFileAppender" type="log4net.Appender.RollingFileAppender">
... |
| 04/30/2009 6:58 PM | Log4Net in C++ |
| Replies: 6 |
Hi, does anyone know if I can use log4net with C++ and Visual Studio 2008Express? If so can you point me to some tutorials, I have spent quite sometime looking for those, but they seem to have completely eluded me.Also if it is not at all possible to use log4net with C++, can you recommendme another logging api?Thanks,Komyg |
| 04/19/2009 10:51 AM | Add new log programmatically and remove when finished |
| Replies: 3 |
I have an application that receives data from many locations.
I have log4net writing to several logs already and I want that to continue, but I also need to separate some of the logging out by the location the data comes from.
What's the best way to do it? I found this message in the archive, but I'm not sure how this will affect the other logging.
http://mail-archives.apache.org/mod... |
| 04/16/2009 5:26 PM | Log4net problem - Windows Mobile 6.0 - CF 3.5 - Log is written in the UDB-file? |
| Replies: 0 |
Hi all,we are using log4net 1.2.10 on a WM 6.0 with CF 3.5.Our project is developed in Visual Studio 2008 - C#.The database that we are using on the device is an Sybase .NET-UltraliteDatabase.Problem!After an update in the database on the device. Log4net starts to write thelog-messages in the database-file.When this happens the database is getting corrupted and this causes a crashfrom the applic... |
| 04/13/2009 9:47 PM | LOG4VIEW 3.0 released |
| Replies: 0 |
After months of development and testing, we are proud to announce the release of LOG4VIEW 3.0. LOG4VIEW is a comfortable and powerful reader for log4net XML- or pattern-formatted log output. LOG4VIEW can read from FileAppenders, UDPAppenders and from a TCPAppender, which is specially developed to work with LOG4VIEW in the LAN oder over the internet.This new release of LOG4VIEW offers bugfixes, spe... |
| 04/08/2009 10:30 PM | Re: Error destroying my productivity Please Help!: log4net:ERROR [] Attempted to append to closed appender named [] |
| Replies: 3 |
Ross Hinkley wrote:>> You can specify a threshold value in the appender. That would allow you> to> log messages from a given level and higher. For example, as a child to> the> appender node:>> <threshold value="INFO">>> would log Info messages, Warning messages, and so on. From there, you can> use Ron's suggestion for controlling what you wa... |
| 04/08/2009 8:54 PM | Re: Error destroying my productivity Please Help!: log4net:ERROR [] Attempted to append to closed appender named [] |
| Replies: 6 |
You can specify a threshold value in the appender. That would allow you to log messages from a given level and higher. For example, as a child to the appender node:<threshold value="INFO">would log Info messages, Warning messages, and so on. From there, you can use Ron's suggestion for controlling what you want to see overall and to manage multiple appenders.If I understand... |
| 04/08/2009 6:17 AM | Error destroying my productivity Please Help!: log4net:ERROR [] Attempted to append to closed appender named [] |
| Replies: 2 |
I cannot figure this one out.I have been tasked by my team to create a logging service so that we can allhave convenient logging without having to integrate it into our individualprojects. I decided to do this I would just build a wrapper around log4netthat makes it even simpler to use than it already is.After not too much work I got it up and running and (seemingly) working. Ihad it running on ... |
| 04/03/2009 11:17 PM | Newbie help for programatically creating log without a config file |
| Replies: 1 |
Hi:I am trying to create a test program that configures a logger completelyfrom code (I want to avoid a config/xml file for this exercise), butalthough I'm not getting any errors, no log file is created.Can anyone help?Regards,Martin.Here is my code:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text... |
| 04/02/2009 10:33 PM | When will the next version be released? |
| Replies: 13 |
Hianyone know that? |
| 03/27/2009 11:16 PM | create new File in case maximumFileSize is reached |
| Replies: 0 |
Hi,I am not sure if this is possible but i like to have log4net to create a newfile when the maximumFileSize is reached.Is there a way to do this?regards,fuppes |
| 03/26/2009 1:36 AM | Dot in logger name is causing log4net to throw exception |
| Replies: 0 |
Hello,first of all thank you for the very good logging framework.While working with Log4Net 1.2.10 I experienced the following problem:When the logger name starts with a ".", LogManager.GetLogger fails withthe following exception:System.ArgumentOutOfRangeException was unhandled Message="Index was out of range. Must be non-negative and less than thesize of the collection.\r\nParameter name: ... |
| 03/25/2009 6:46 AM | Rolling log files based on date |
| Replies: 3 |
Hi,
I want to have a log4net log file 1 per day and I want to preserve log4net log files for the last 5 days only. Could log4net rolling file appender could be configured to do that ?
Thanks in advance and regards
Navin |
| 03/24/2009 3:59 AM | Generatinf CSV file output |
| Replies: 2 |
Hi,
Is it possibel to generate a CSV file output with custom data using log4net ? I want to have a CSV file per day(which I could do using RollingFileAppender) but want to have custom comma delimited fields besides timestamp and message in there ? Is it possible ?
Thanks in advance and regards
Navin |
| 03/21/2009 1:17 AM | Can I stop log4net from posting to Console.Out.Error when it has a problem? |
| Replies: 0 |
Hello,
Basically the question is in the title. When something goes wrong with my appender i'd rather get no indication of the problem as opposed to getting a message in Console.Out.Error. Is there a way to do this?
Simon Tamman
Software Engineer Parkeon Transit
Tel: +44 (0)1202 339403 Fax: +44 (0)1202 339369 Mob: +44 (0) 7742984125 |
| 03/20/2009 6:51 AM | Using log4net in commericial application |
| Replies: 1 |
Hi,
I'm using log4net in an application. As per terms of its Apache license, it seems it would be enough to redistribute two files along with log4net dll - License.txt and Notice.txt that refers to the license.txt along with our setups. Both of these files are in log4net distribution(http://logging.apache.org/log4net/download.html). So, if I includ... |
| 03/17/2009 8:59 PM | PatternString and ThreadContext |
| Replies: 0 |
I'm currently trying to get log4net to dynamically add emails to anSmtpAppender during runtime using the ThreadContext. I can set valuesto the ThreadContext.Properties dictionary without a problem. I canalso refer to them in most instances through the appender. The valueswill show up within the pattern layout section. However when I use aPatternString on a to field for the SmtpAppender, the prop... |
| 03/17/2009 6:11 PM | XmlHierarchyConfigurator: Failed to find type |
| Replies: 2 |
Hello,I just turned on log4net's internal debugging to see everything goes clean and noticed this error:log4net:ERROR XmlHierarchyConfigurator: Failed to find type [log4net.Appender.RollingFileAppender+MinimalLock]System.TypeLoadException: Could not load type [log4net.Appender.RollingFileAppender+MinimalLock]. Tried assembly [log4net, Version=1.2.10.0, Culture=neutral, PublicKeyToken=1b44e1d426115... |
| 03/15/2009 5:34 AM | How do I use the pattern appender? |
| Replies: 0 |
Hello,
I have an app that is used by approximately 220 clients right now. At times they send data every few minutes. It's very had to wade through the data and it doesn't take long before it rolls off the end. I would like to have each clients logs put in a separate folder by the client ID.
&nb... |
| 03/13/2009 4:50 PM | Duplicate debug log |
| Replies: 0 |
Hello,I use log4net 1.2.10 in an asp.net mvc site (.NET 3.5 SP1).There may be something I misunderstood regarding loggers and additivity.I have the following configuration :[code]<log4net> <appender name="Console" type="log4net.Appender.ConsoleAppender"> <layout type="log4net.Layout.PatternLayout">  ... |
| 03/13/2009 4:38 PM | Copy log4net.config when publishing ? |
| Replies: 0 |
Hello,I use log4net 1.2.10 within an ASP.NET 3.5 MVC RC2 project.Thus I initialize log4net configuration in Global.asax.cs class by this code :[code]string filename = Server.MapPath("log4net.config");XmlConfigurator.Configure(new System.IO.FileInfo(filename));[/code]This works. log4net.config defines the standard "log4net" XML tag and its content.I have an issue when publishing my project using Vi... |
| 03/05/2009 11:58 PM | Adding a logger stops another one from working...!? |
| Replies: 1 |
Hi,I'm new to log4net, and I'm having a problem with multiple loggers. I had an AdoNetAppender logger in my config file, and it worked fine,logging issues to a database.I then added another logger, to log other ERRORS to a text file. Thisactually stopped my AdoNetAppender from logging to my database.The configs are below - am I missing something obv... |
| 03/02/2009 6:18 PM | PropertyFilter |
| Replies: 0 |
Hi,I'm logging something like that :<conversionPattern value="%date %identity %-5level %logger : %message%newline" />I want to filter by identity, then I tried to use the PropertyFilter :<filter type="log4net.Filter.PropertyFilter"> <key value="Identity" /> <stringToMatch value="domain\username" /></filter>This doesn't seem to work. I also tried with "log4... |
| 02/26/2009 5:37 PM | ILayout.Format: must it be thread safe ? |
| Replies: 0 |
Hello Everyone,
I want to develop my own Xml Layout and thus took a look at the XmlLayoutBase
and XmlLayoutSchemaLog4j source code. My Layout will inherit from XmlLayoutBase.
I am just wondering, and did not found the answer in the SDK Reference:
must the ILayout.Format method be thread safe?
&nb... |
| 02/25/2009 8:33 PM | DEBUG vs INFO |
| Replies: 6 |
Hi,I just switch from DEBUG to INFO in our application logging and thedifference is pretty much stunning. E.G. our perf has gone from 23seconds down to 14 because of the change. Is this a known issue. i.e.debug log level is expected to impose this kind of overhead.ThanksGraham |
| 02/25/2009 5:13 AM | How to get a class-type based logger in multi-dll web service? |
| Replies: 0 |
I have a web service (framework 3.5) project with 5+ related projectscompiling into it, some of which are re-used in other services.I am having trouble in the satellite dlls in getting a reference to alogger based on the class type. Nothing fails hard, just no logginghappens.This works: ... = LogManager.GetLogger("Root");This fails: ... = LogManager.GetLogger(typeof(MyClass));T... |
| 02/25/2009 1:41 AM | just downloaded the latest release |
| Replies: 0 |
hey all,i noticed for the file appender in the web.configthe following doesn't work:<footer value="[Footer]\r\n;" />instead i had to do the following:<footer value="[Footer] " />what's the difference? it was working in 1.2.8 beta. How can i find a listof these and what they represent? |
| 02/24/2009 4:18 AM | where is threadcontext |
| Replies: 4 |
hi all,i was looking at NDC in the log4net SDK and read the following:The NDC is deprecated and has been replaced by the Stacks. The current NDCimplementation forwards to the ThreadContext.StacksBut i don't see it when i inspect the log4net namespace.i'm a noob to log4net please go easy.thanks,rodchar |
| 02/19/2009 6:55 PM | How to keep only logs of the last 5 days? |
| Replies: 0 |
Hi all,I configured log4net using a RollingFileAppender that rolls the log file on a daily basis.So I've tried to use rollingStyle=Date. (Or Composite). But that keeps me at least 1 file a day.How can I configure log4net to keep only log files of the last 5 days? (Older log files should be deleted like using "rollingStyle=Size" and maxSizeRollBackups = 5)Is there a way to achieve that?Thanks in ... |
| 02/19/2009 12:19 PM | Working with C++ |
| Replies: 3 |
I have a mixed project with C# and C++. I use happily the logger in C# but don't know how to use it from C++.
Is there any sample for that?
Regards
I. Lesher |
| 02/19/2009 8:47 AM | Download file is corrupted |
| Replies: 0 |
Hi There, I try to download the file, but this file can be corrupted, i try to chage browser to download the file (may be its getting cache), and i try winrar, winzip, 7-zip e more.--Bruno FrankCordeirobfscordeiro@gmail.com |
| 02/18/2009 4:49 AM | Programmatically change file path for appender with additivity = false |
| Replies: 0 |
Hi,I'm trying to programmatically change the log file destination for a logger using the following codefound on this list:public static void UpdateFileAppenderPaths(string theNewPath) { log4net.Repository.Hierarchy.Hierarchy h = (log4net.Repository.Hierarchy.Hierarchy) log4net.LogManager.GetRepository(); foreach (IAppender a in h.Root.Appenders) { if (a is Fil... |
| 02/13/2009 11:10 PM | AppendToFile with RollingFileAppender |
| Replies: 0 |
Hi All,I'm using a RollingFileAppender to maintain a daily log file for my application (ie it rolls the filesonce per day of week). Its basically working fine, however it the rollling isn't working quite as Iexpected. My goal is append to only have 1 day's worth of data in each file with anything older than aweek being overwritten. What I'm currently seeing is that today's Frid... |
| 02/11/2009 8:39 AM | RollingFileAppenders per Class |
| Replies: 2 |
Hi peoples,
I've used log4net for a while, but I've got the following problem.
I have a rolling file appender that takes everything, we'll call this the "VerboseAppender", easily configured. ALL levels go to it and everything gets logged.
I have an ADO.Net appender that takes ERROR,FATAL level and logs to a stored procedure. We'll call this the "DBAppender"
&nbs... |
| 02/09/2009 10:40 PM | Problems with Log4Net zip file |
| Replies: 4 |
Hi,I want to use the Log4Net in a new application I'm working, but I had some difficults to get the log4net bin to add on my application. I'm using .net framework 2.0.I already downloaded log4net 1.2.10 (zip) in this address: http://archive.apache.org/dist/incubator/log4net/1.2.10/incubating-log4net-1.2.10.zipWhen I click in incubating-log4net-1.2.10.zip I got an error saying the file can be corru... |
| 02/04/2009 9:40 PM | RollingFileAppender behavior on program exit |
| Replies: 1 |
Hi,I am using log4net 1.2.10 RollingFileAppender in C#/VS2005. Rolling the files by date. Everything isworking fine except that the final log file written before program exit is not rolled and remains namedas a temp file (just the name as specified in file value without the date pattern and extension). I amcalling the Shutdown function, but this does not seem to help. Att... |
| 02/04/2009 3:54 PM | Re: using a specific log file for a specific classes |
| Replies: 1 |
Pierre LHUSSIEZ wrote:>> Hi,>> coul You help Me, please, how use specific log for MORE CLASSES ??? (no> one class only)>> does log4net provide this feature?>> thanks.>> --> Pierre LHUSSIEZ>> |
| 02/03/2009 1:10 PM | Using Log4Net for Distributed Logging |
| Replies: 1 |
Hi, I am relatively new to Log4Net. I would like to know whether Log4Net can be used for logging in adistributed environment. I am looking at 2 scenarios- Scenario 1: A 20 server site. One of the server takes care of logging (Logging Server). Every other servers pushes the log information to this centralized loggingserver. Which appender can i use ? (RemoteAppe... |
| 01/31/2009 10:21 AM | Change the log level programmatically? |
| Replies: 6 |
Hopefully this is an easy question which has already been asked (and answered) before.
I searched online, but could not find a reasonable answer…
Is there a way to change the default log level of a logger via C# program control?
I don’t need the setting to persist, so I don’t want to have to change the XML config file and re-read it.
In my C# code, I have a IL... |
| 01/28/2009 6:21 PM | ADO.Net appender configuration for sybase? |
| Replies: 5 |
In log4net configuration, we have found sample xml code for most of the common RDBMS except Sybase.
Could you please tell me how can I configure the Sybase database with log4net using ADONet appender?
Thanks
Bibhakar |
| 01/28/2009 5:16 AM | Can we use log4net with .Net FW3.5 Applications? |
| Replies: 5 |
Hello,
I created a custom "Wrapper" component (in .Net FW 2.0 and Visual Studio 2005) that utilizes the log4net dll and exposes methods that enable logging for my applications. I plan to migrate this Wrapper component to use .Net FW 3.5 and Visual Studio 2008 in the near future and would like to find out if I can use log4net dll (as a reference) from a .Net FW3.5 application?
... |
| 01/27/2009 6:39 PM | log4net query |
| Replies: 3 |
Hello,
I have two applications let’s say WindowApp1 and WindowApp2 and both are writing to the same log file let’s say “c:\abc.txt”.
With log4net can it be possible to write to the same log file by both these app at the same time? I tried but couldn’t able to do that.
Please help!!
Thanks,
Bibhakar
|
| 01/21/2009 12:02 AM | Issues with Korean/Chinese locales in XmlLayout... |
| Replies: 4 |
Hi,
I am using v1.2.10 and having issues with Korean and Chinese locales. I am using XmlLayout and in the XML log file, messages (contents of the element “message”) in Korean and Chinese languages appear as “????”. I am using the correct encoding “utf-8”, however I tried with other possible encodings supporting Unicode but the problem did not get solved.
I debugged the code and found ... |
| 01/20/2009 9:29 PM | corrupt zip file? |
| Replies: 1 |
Dear community;I've been trying to download the zip file athttp://archive.apache.org/dist/incubator/log4net/1.2.10/incubating-log4net-1.2.10.zip,but for some reason, at the time of uncompressing, I'm getting a! C:\Documents and Settings\Desktop\incubating-log4net-1.2.10.zip:The archive is either in unknown format or damagedand it obviously doesn't extract anything. I'm using winrar (... |
| 01/05/2009 11:38 PM | Rich text box appender... |
| Replies: 0 |
hi,
I have a rich text box appender in place and everything is working correctly. However at runtime, the rich text box output (which is my log4net output), has all its text selected and the colour is wrong. Anybody know how I configure RichTextBox appender such that the contents of my rtb is not highlighted.. and even if it must be highlighted, anybody know how I can change this colour. ... |
| 12/24/2008 1:41 PM | My 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/20/2008 4:58 AM | stopping 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 4:44 PM | CustomAppender 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/16/2008 1:12 AM | Logging 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 8:28 PM | Re: 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 10:46 PM | How 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 6:55 PM | Coding 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/04/2008 1:42 AM | error 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 9:14 PM | logging 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 7:31 AM | Best 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 11:32 PM | Logging 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 10:43 PM | Strong 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 6:22 PM | Re: 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/26/2008 5:25 AM | Issues 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/26/2008 3:05 AM | configuration 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 7:37 PM | getting 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 9:04 AM | RollingFileAppender 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 9:56 PM | How 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/15/2008 1:07 AM | conversionPattern 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 1:56 PM | AdoNetAppender 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/12/2008 4:34 AM | Trying 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 10:12 PM | Rolling 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 6:50 PM | Configuring 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 4:36 PM | Printing 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 6:59 PM | SQL 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 7:04 PM | FW: 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/05/2008 12:37 AM | ApacheCon 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 8:14 PM | Set & 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 7:53 PM | when 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 5:22 PM | Using 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 5:16 PM | Help 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 9:46 PM | log4net 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 1:55 PM | Partial 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 8:52 AM | Can'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 8:08 PM | How 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 9:15 PM | Abortion 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 9:28 PM | AdoNetAppender 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 3:39 PM | Not 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/11/2008 12:05 AM | Log4Net 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 1:01 PM | Port 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/07/2008 5:53 AM | RollingFileAppender 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 9:43 PM | Using 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/05/2008 12:42 AM | Fwd: 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 9:57 PM | Log4net 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/03/2008 2:44 AM | Replacing 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/03/2008 2:39 AM | Composite 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/03/2008 12:39 AM | custom 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/02/2008 5:27 AM | Chained 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/02/2008 3:34 AM | Configuration 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 11:29 PM | Appender 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/24/2008 4:03 AM | roll 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 9:50 PM | logger 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 6:47 PM | How 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/17/2008 4:08 AM | RollingFileAppender 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 5:05 PM | Problems 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 10:20 AM | closed 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 7:05 PM | Getting 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/12/2008 3:27 AM | Problems 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 8:27 PM | Same 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/11/2008 12:44 AM | GAC 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 7:03 PM | Additivity 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 5:43 PM | Database 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 2:54 PM | Question 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 7:48 AM | Visual 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 9:20 AM | Persisting 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/29/2008 4:07 AM | Whatever 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/28/2008 5:05 AM | SmtpAppender - 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 1:05 PM | IsDebugEnabled = 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 8:01 AM | Multiple 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 6:38 PM | domains 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/19/2008 3:17 AM | Can 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/14/2008 3:43 AM | Conigure 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 7:20 PM | Logging 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 4:12 PM | ASP.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/07/2008 3:03 AM | Adding 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/06/2008 2:43 AM | log 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 10:11 PM | Excluding 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 11:37 AM | NUnit + 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/30/2008 3:22 AM | more 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/30/2008 2:58 AM | Change 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 5:20 PM | Change 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 8:04 PM | Writing 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 8:06 PM | FW: 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 12:55 PM | how 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 10:18 PM | RollingFileAppender 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 8:11 PM | XML 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/11/2008 1:05 AM | AdoNetAppender.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 7:40 AM | Must 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/02/2008 12:20 AM | EventLog 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 6:49 AM | Message 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 6:33 AM | Default 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 6:03 AM | Parsing 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/28/2008 4:42 AM | Specifying 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/25/2008 5:01 AM | Web 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 3:13 PM | rich 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 5:49 PM | Log4Net 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/19/2008 3:44 AM | testing 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 4:14 PM | Winforms |
| 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 11:40 PM | Retry 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/14/2008 3:41 AM | filtering 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 6:51 PM | log4view 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/05/2008 1:13 AM | Question 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 9:54 PM | Multiple 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 7:59 PM | Distinguishing 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 8:11 PM | Filter 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/30/2008 5:58 AM | root 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 1:27 PM | bypassing 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/20/2008 4:53 AM | How 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 7:23 PM | how 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 11:18 PM | Configuration 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 10:10 PM | Log4net 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/16/2008 12:34 AM | log4net 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/14/2008 12:51 AM | Cannot 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 3:57 PM | Combining 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 11:26 PM | Problem 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 8:49 AM | logging 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/08/2008 12:31 AM | Forcing 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/06/2008 12:51 AM | FW: 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 3:31 PM | log4net 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/03/2008 5:00 AM | Throttling/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 9:05 PM | SmtpAppender 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 11:52 PM | log4net 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/26/2008 3:42 AM | Appending 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/25/2008 12:12 AM | Rich 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 8:48 PM | Moving 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 3:06 PM | How 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 11:01 PM | Log4Net 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 5:32 PM | Counting 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 11:57 PM | Problem 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 2:26 PM | log4net.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/13/2008 1:17 AM | Faster %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 9:26 PM | Problems 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 10:10 PM | SmtpAppender 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 10:47 PM | System.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 9:41 PM | Logging 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 4:34 PM | DeliveryMethod in log4net |
| Replies: 1 |
Hello, can I config the DeliveryMethod property of SmtpClient object that sends mail in smtpAppender?? tnx |
| 03/19/2008 3:34 PM | routnig 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 3:10 PM | Preventing 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 7:53 AM | Log4Net 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 8:39 AM | ASP.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/14/2008 3:09 AM | Is 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/13/2008 5:17 AM | Log4Net 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/13/2008 12:09 AM | logging 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 9:05 AM | Usage 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 11:44 PM | Reusable 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 11:20 AM | rollingfileappender - 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 4:56 PM | SQL 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... |
| 03/01/2008 3:11 AM | log4net 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 12:33 PM | Logging 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/28/2008 1:02 AM | Re: 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 11:49 PM | Proprieraty 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 8:14 PM | log4net 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 9:27 AM | Possible 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/23/2008 12:36 AM | Problem 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 5:30 PM | Logging 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 1:47 PM | SmtpAppender 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/21/2008 5:06 AM | Properties 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 10:06 PM | Formatting 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 8:01 PM | log4net .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 3:21 PM | WMI-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/19/2008 12:21 AM | Logging 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 11:57 PM | Using log4net.Util.PatternString in a PatternLayout |
| Replies: 5 |
I have the following layout defined for a RollingFileAppender (log4Net1.2.10)<layout type="log4net.Layout.PatternLayout"> <param name="Header" type="log4net.Util.PatternString"value="%newline**** Trace Opened Local: %date{yyyy-MM-ddHH:mm:ss.fff} UTC: %utcdate{yyyy-MM-dd HH:mm:ss.fff} ****%newline"/> <param name="Foote... |
| 02/18/2008 9:49 PM | Problem with maxSizeRollBackups |
| Replies: 3 |
Hi,
I have a problem with maxSizeRollBackups or maximumFileSize, because i try create two o more log file when your's size is more than 5 KB, but this is not possible.
¿Are you have the same problem?
I use framework 1.1.4322, Vstudio 2003 ASP.NET and log4net 1.2.10
And my log4net configuration is:
<appender name="RollingFile" type="log4net.Appender.Ro... |
| 02/18/2008 5:56 PM | Could not find schema information for the element 'log4net'. |
| Replies: 0 |
Hi,I'm using Visual studio 2008, targetting .Net Framework 2.0, a C# consoleapplication.I tried to configure Log4net in the app.config file, but I got this messagefro mVS 2008 :Could not find schema information for the element 'log4net'.and the logging does not work.I used this solutionhttp://www.verysimple.com/blog/2007/02/07/could-not-find-schema-information-for-the-element-log4net/but sti... |
| 02/18/2008 5:45 PM | RollingLogFileAppender |
| Replies: 4 |
Hi all,Quick question. I am using a RollingLogFileAppender on a webservice. Logging works 100%, but whenever I try to open the log file for reading in another process I get a sharing violation on the log file. I open the file with:FileStream file = new FileStream(fileName, FileMode.Open, FileAccess.Read, FileShare.Read);Would I have to enable MinimalLock, or is there a way to use ExclusiveLock and... |
| 02/18/2008 1:04 PM | To insert message into "Authlog" using RemoteSyslogAppender |
| Replies: 1 |
Hi Friends,I have noted that log4net is not supporting to insert message into "Authlog"facility. Following are the facilities those are supported by log4net. Kernel,User,Mail,Daemons,Authorization,Syslog,Printer,News,Uucp,Clock,Authorization2 Ftp,Ntp,Audit,Alert,Clock2,Local0,Local1,Local2,Local3,Local4,Local5,Local6,Local7I could insert the messages into "Local7" bu... |
| 02/15/2008 10:26 PM | Performance Issues with SMTP Appender |
| Replies: 2 |
Hi,
I am using log4net 1.2.10 and have an application which processes around million records on a daily basis. Recently, I added SMTP appender to it and the running time of that process increased from 30 minutes to approx 3 hours even though the threshold value was set at WARN and I didn't log any WARNs at all ever since I added the SMTP appender.
Removing the SMTP appender brought... |
| 02/08/2008 10:17 AM | Multi-app centralized logging vs. per app logging and background process consolidation |
| Replies: 6 |
A previous generation application suite simply uses OutputDebugString( )to achieve centralized logging for a multi-app suite running on a singlehost. The next generation replacement is in the design stage, and willbe distributed. It is desired to maintain an efficient and reliablemeans of centralized logging.One idea is some sort of publish-subscribe model, whereby each appwrites to a ... |
| 02/07/2008 10:07 AM | The current target framework (Microsoft .NET Framework 3.5) is not supported by log4net |
| Replies: 10 |
I have recently installed Visual Studio 2008 which uses Microsoft .NET Framework 3.5. When I tried to build log4net, I got the message “The current target framework (Microsoft .NET Framework 3.5) is not supported by log4net.”
Is there a workaround? If not, when will 3.5 be supported by log4net?
Thanks,
-Mike |
| 02/05/2008 9:58 PM | I'm not able to get the latest version |
| Replies: 2 |
I tried to download the latest (incubating-log4net-1.2.10.zip) release,but the file seems to be corrupted. I tried with WinRAR and also with7zip.Maybe the mirror nearest to my location (Germany) has some problems.I would like to be able to test the last version.Thank you!Rafa--Wincor Nixdorf International GmbHSitz der Gesellschaft: PaderbornRegistergericht Paderborn HRB 3507Geschdftsf|hrer: Eckard... |
| 02/05/2008 7:20 PM | Log4Net used into Class library |
| Replies: 1 |
I'm develping a little library, and I'm adding log features to it, now. Theproblem is that I don't know How I Can configure Log4Net. In my code Iobtain a logger as:private log4net.ILog logger =log4net.LogManager.GetLogger(typeof(OnCloseSessionManager))but, when I need to use it (the logger), it is null.I also have this line in my code:[assembly: log4net.Config.XmlConfigurator(ConfigFile="log4net... |
| 02/04/2008 11:30 PM | need working Log4Net source |
| Replies: 1 |
I have downloaded the source from incubating-log4net-1.2.10.zip,but I was not able to extract it. It throws an error. Can any one help me giving the working source.
|
| 02/04/2008 11:11 PM | need working sorce code for Log4Net |
| Replies: 0 |
Hi,
I was trying to download the log4net zip file and trying to extract it is giving me error, can anyone help me in finding the working code.
Thanks
Srini
|
| 02/04/2008 11:09 PM | A caching / metering SMTP appender ... |
| Replies: 0 |
Several weeks ago, I posted a couple of notes on this list on the subject of metering of SMTP log events and an elapsed time evaluator. The objective was to design a log4net extension that would accommodate the caching and metering of log events sent via SMTP. In a situation where a server is failing and generating large quantities of severe log events that need to be sent via ... |
| 02/04/2008 9:50 PM | Remote listening of server log stream ... |
| Replies: 3 |
I have a scenario where I have a server with several ADO.NET and Windows services running. Under normal operation, the applications write log messages of various severities to a rolling file(s), Windows event viewer, and e-mail via the SmtpAppender.
I would like to set up a logger/appender that would allow remote listening in on the stream of logging messages. In this case, ... |
| 02/03/2008 8:05 PM | Error handling inside log4net |
| Replies: 1 |
How does log4net handling exception of itself--View this message in context: http://www.nabble.com/Error-handling-inside-log4net-tp15253276p15253276.htmlSent from the Log4net - Users mailing list archive at Nabble.com. |
| 01/30/2008 9:25 PM | (AUS1977)logging to different appenders dipending on level |
| Replies: 3 |
Is it possible use log to different appenders from same logger name dipendingon level.I'll try to explane myself mor clearly .For example we have some loggernamed MyLogger so we need this logger to log INFO messages toConsoleAppender,WARN messages to LogFileAppender and ERROR messages toRollingLogFileAppender?SOS!!!!!!!!!!!!!!!!!! |
| 01/30/2008 9:39 AM | ADO.Net Appender connection troubles |
| Replies: 2 |
I am trying to use the AdoNetAppender, but I am in an environment inwhich the connection string is dynamic, depending on which of a seriesof servers the app connects to. My idea is to get a reference to theappender and reset the ConnectionString when my app knows which serverI am connecting to.This sounds fine, but I only have access to an instance of anIDbConnection. The ConnectionString property... |
| 01/30/2008 2:15 AM | UDP Viewers ... |
| Replies: 2 |
I am doing some experimenting with the log4net UDP appender. I’m presently using Log4NetViewer and/or logview4et as receivers for these messages.
Both of these viewing clients have their limitations (except that they ARE freely distributed—thanks to the authors).
Does anyone know of any other UDP log4net viewers? Maybe something with a few more features?
&n... |
| 01/29/2008 3:08 AM | complete docu for current configfile format |
| Replies: 2 |
Hallo @all,
perhaps you can provide me with some hints how to get a complete list of all features, configureable in the configfile. I downloaded the latest version of log4net and studied the great docu and the examples. Googling for more, i found a very important tag that is not listed in the docu (ok, at least i didnt found it): <level>
So, beside of checking the... |
| 01/28/2008 11:34 PM | using a specific log file for a specific class |
| Replies: 1 |
Hi,I'm searching how use a specific log file for a specific class.does log4net provide this feature?thanks.-- Pierre LHUSSIEZ |
| 01/25/2008 8:24 AM | Log4net and SQL Server Reporting Services |
| Replies: 1 |
Greetings,We've been having a hard time convincing log4net to work under SSRS.If anyone has had any positive experiences or suggestions, I wouldappreciate your feedback. We are implementing custom (data andsecurity) extensions and have done the following:All our assemblies (including log4net.dll) in ReportingServices\ReportServer\bin:- Have read/execute permission forSQLServer2005ReportingServices... |
| 01/24/2008 6:01 PM | Does log4net support 64-bit Windows environments? |
| Replies: 8 |
Hello,
We are currently planning on moving our .NET applications from Windows 2003 Server 32-bits, to the Windows 2003 Server 64-bits platform and are investigating if our applications can handle the 32 extra bits.
We use log4net in all of our applications and when looking through the source I saw a few DLL Imports which could cause a problem. I tried looking on the log4net web... |
| 01/17/2008 11:10 PM | Log File Naming Problem |
| Replies: 8 |
Hello,I have a multi-threaded application using log4net 1.2.10 for logging.There are a couple of points when the application runs where there area large number of logs occurring simultaneously from multiple threads(that happen to be in different App Domains). On occasion, I will endup with two separate log files generated when this point in myapplication occurs. One of the log files wi... |
| 01/17/2008 10:56 PM | how to get log4net |
| Replies: 1 |
I am trying to download the latest log4net.
I go here:
http://logging.apache.org/log4net/download.html
and click on the log4net 1.2.10 (zip)
and it times out.
How do I get log4net? |
| 01/17/2008 11:24 AM | Conversion pattern reverse engine |
| Replies: 4 |
Hi
I wonder if anyone can help me with this.I have a log file and the conversion pattern. [%H %d] %c{1} %5p: %m (%F{1}:%L)%nis it possible to extract the log file and get certain field , for example I would like to get "%d" from the log file.If it does, does anyone can give me a bit of example?Thanks, ______________________________________________________________... |
| 01/17/2008 11:22 AM | Fw: failure notice |
| Replies: 0 |
Hi,I wonder if anyone can help me with this.I have a log file and the conversion pattern. [%H %d] %c{1} %5p: %m (%F{1}:%L)%nis it possible to extract the log file and get certain field , for example I would like to get "%d" from the log file.If it does, does anyone can give me a bit of example?Thanks, ___________________________________________________________________... |
| 01/17/2008 6:21 AM | GlobalContext.Properties, RollingFileAppender, and PatternString |
| Replies: 2 |
I have multiple services running using log4net on a system and would like to globally set the base logging directory programmatically at startup.It seems I should be able to set a BaseLogsDirectory property in GlobalContext.Properties and use it in a pattern string like this:<file type="log4net.Util.PatternString" value="%property{BaseLogsDirectory}\logfilename" />
Although the property see... |
| 01/07/2008 6:11 PM | Error handling: how to be sure logs were correctly written ? |
| Replies: 4 |
Hello everyone,
We need a logging framework that runs on CF 2.0 (as log4net exists for CF 1.0, it runs on CF 2.0) that can assure us that log was successfully performed on every Appender.
In fact we want our application to be told by the logging ... |
| 01/04/2008 8:51 AM | Configure log4net in a C# DLL |
| Replies: 0 |
Hi, I am developing a ClassLibrary in C#(VS2005). I have refernce to log4net.dll. This DLL has only one function which will log a string using log4net. My App.config file has the following content: ... |
| 01/03/2008 7:10 PM | Correct point to add a custom property? |
| Replies: 2 |
Hi, We're trying to integrate log4net into our current applicationframework. We need to log an ID property against each log entry,retrieved from the object we're trying to log. This ID willeventually go in a separate column in the database we're logging to.To keep things simple, I'm currently using the FileAppender to testthings.Effectively we want to do :-_logger.Warn(new ... |
| 12/24/2007 9:18 PM | Programatically disable email |
| Replies: 1 |
Hi all!
My current configuration use an smtpAppender with a LevelRangerFilter setted in order to send ERROR messages, but in some cases I would like to disable the email capabilities, in order to achieve something similar to the previous discussion of “Elapsed time evaluator” but in my case I want to manage this in my code.
Is there any idea for this?
Thanks in advance and Mer... |
| 12/20/2007 10:50 PM | Pbx SMDR with log for net |
| Replies: 0 |
a simple question,
is possible to implement log4net to work with tadiran smdr ??
thx in advice,
john |
| 12/20/2007 1:58 AM | BCC in SMTP Loger Appender! |
| Replies: 2 |
Just a simple question!
It is possible to config the smtp logger appender to use a bcc email address?
Thanks in advance
Erlis |
| 12/17/2007 9:23 PM | AdoNetAppender defects when used in Web Services |
| Replies: 0 |
To all,I'm trying to use log4net to log to a database and to the EventLog. Here'smy setup:I have a C# console application which calls a C# web service. Bothapplications are written under the .Net 2.0 Framework. Both applications areusing a "global" xml configuration file, which is loaded via theXmlConfigurator. The configuration uses 2 appenders, the AdoNetAppender andthe E... |
| 12/15/2007 6:25 PM | How to enable IP address logging with Log4Net configuration |
| Replies: 3 |
Hello,I am asp.net user, and want to store IP address in Log4Net logs, I amusing RollingFileAppender, so how can I enable IP logging withconversion pattern.Please let me know, how its is possible ?Thanks in advance,Laxmilal |
| 12/13/2007 10:35 PM | Elapsed time evaluator |
| Replies: 2 |
As a follow up to my question about metering SMTP messages, I was thinking about the possibility of creating a custom Evaluator that works on elapsed time. Whereas the LevelEvaluator triggers on a particular level of message, this evaluator would trigger on a specified elapsed time.
In the case of and SMTP appender, an ‘ElapsedTimeEvaluator’ would wait for a specified period of ti... |
| 12/13/2007 8:42 AM | Addendum: Lossy Value in SMTP Appender - Possible Bug? |
| Replies: 0 |
That should have read:
“Generic. Yes, we have BufferSize set to 1, however,
Development sent me a file with lossy=FALSE. I understand how the lossy value
works, but I am a little fuzzy on this particular situation, which I will
describe below:”
My apologies for the mixup.
CJ
From: Johnson, Cedrick
[mailto:c... |
| 12/13/2007 8:37 AM | Lossy Value in SMTP Appender - Possible Bug? |
| Replies: 1 |
Hello-
My apologies, I’ve been trying to figure this out for the past few hours. We have an application that has the following log4net config:
<root>
<level value="INFO" />
<appender-ref ref="RollingLogFileAppender" />
<appender-ref ref="ConsoleAppender" />
<appender-ref re... |
| 12/12/2007 3:45 AM | Metering SMTP logging ... |
| Replies: 0 |
I have an application for which I would like to use the SMTP logging appender, but would like to add functionality that would limit the number of e-mail messages generated.
Presently, log messages are passed through a method that keeps track of the number and frequency of log messages by level (DEBUG, INFO, etc.). If any ERROR messages are received in a specified period of time (s... |
| 11/29/2007 1:40 AM | log4net-events.dtd ? |
| Replies: 0 |
Where can I get the log4net-events.dtd file? It is referenced in a few places in the documentation (for example: http://logging.apache.org/log4net/release/sdk/log4net.Layout.XmlLayout.html ) and release notes, but it doesn't seem to be in my source download.Thanks.
Never miss a thing. Make Yahoo your homepage. |
| 11/28/2007 1:38 AM | SmtpAppender sending messages late |
| Replies: 1 |
Howdy-I have a problem with the SMTP Appender in L4N that has stumped me forthe better part of today.Summary:When I get a WARN message, it seems that the SMTP Appender will send itout 2-3 minutes after the WARN message was shown in the console. Well,that's all fine and dandy, but by the time we're logging ERROR and FATALmessages, it needs to be as 'instantaneous' as possible.If the app reaches a l... |
| 11/27/2007 9:37 PM | batching log entries until exception |
| Replies: 7 |
Hello,I searched the list for this information, but I think my use case is a bitobscure. I am researching Log4Net as a possible plug-in logger for oursoftware. We would like to have or create an unusual feature. We would like to collect log entries in memory during a discrete scope. Inour case, this would be an ASP.NET request. We want to hold onto these logsin memor... |
| 11/26/2007 8:40 PM | How to write the level in the subject |
| Replies: 0 |
Hi,
I have a short question : using the SmpAppender, how to write the level in the subject?
Thx for your help
Pascal
Ce message et toutes les pièces jointes peuvent être confidentiels, et, de plus, peuvent être couverts par un privilège ou une protection légale. Il est établi à l’intention exclusive de ses destinataires. Toute utilisation de ce messag... |
| 11/26/2007 2:48 PM | How to read and update the log file directory, with .NET C#? |
| Replies: 1 |
I am a newbie in .Net C# and log4Net.
I have my log4net running OK with my .NET app and this is the configuration file.
I need to display to end-user what the directory is for my log file and i want to allow user to provide a new directory name to update the log file.
how i can do that?
please help and thanks
<?xml version="1.0" encoding="utf-8" ?>... |
| 11/22/2007 8:24 AM | RE: Programmatically Change Configuration? |
| Replies: 4 |
Hi,Snozz:
I reset my log4net configuration in global.asax for asp.net project.
string serverMapPath = Server.MapPath("~");
string configFile = serverMapPath + ConfigurationManager.AppSettings["Log4NetPath"]; log4net.Config.XmlConfigurator.ConfigureAndWatch(new Syste... |
| 11/16/2007 1:49 PM | RE: Current file of RollingFileAppender |
| Replies: 0 |
Hello,
current file is always that one specified in File property. When rolling is trigerred (for example date is changed), current file is renamed and new file with name specified id File property is created.
R
|
| 11/15/2007 8:28 AM | Programmatically setting Header |
| Replies: 1 |
Hi, I have all my log4net settings in a configuration file except for the header. This is because I want to output the product version information at the beginning of each log file. This version info is only available to me at runtime. How can I set the Header programmatically?
I tried the following but it doesn't work…
ILog iLog = LogManager.GetLogger(typeof(ICOLogger)); ILoggerRe... |
| 11/14/2007 1:17 PM | No logs on vista in program files |
| Replies: 5 |
No logs are written on vista.I assume this is because the application is run as user not admin, andtherefore log4net can't write to program files area?Where are you writing your logs on vista?--View this message in context: http://www.nabble.com/No-logs-on-vista-in-program-files-tf4802432.html#a13740585Sent from the Log4net - Users mailing list archive at Nabble.com. |
| 11/14/2007 4:56 AM | Multi-threaded ASP.NET application not working ... |
| Replies: 2 |
I am a long time log4net user, but apparently, I have tripped over a scenario for which I cannot seem to find a solution:
Using:
Microsoft Visual Studio Version 2005
.NET Framework Version 2.0
log4net Version 1.2.10
I have a class library in an assembly which contains a data cache object that is multithreaded. It contains a simple worker thread that polls for changes t... |
| 11/08/2007 8:46 PM | Problem with the configuration |
| Replies: 0 |
Hi all.
This is my first post J
I have a web site and a Data Object Layer.
I’m trying to use log4net in my DAL but I have a problem with the configuration.
I want to use an external file named log4net.config in the folder Config/
Here, one class of my DAL:
Imports System.Configuration
Imports System.Data.Common
Imports System.Xml
Imports ... |
| 11/08/2007 6:06 PM | Error text output |
| Replies: 0 |
Hi,
Is there a config key I can specify to prevent log4net outputting to = the Console window if an exception occurs? Im using the CF version as i'm developing on an embedded device and a = Console window appearing if the logging fails is something i'd like to = avoid.
Kind Regards
Simon Tamman
Software Engineer Wayfarer Transit Systems Tel: 01202... |
| 11/08/2007 5:04 PM | Performance issue when using Log4net- asp.net2.0 |
| Replies: 0 |
Hi, I am new to log4net and would really appreciate if someone could help me. I am using log4net with ASP.net 2.0 and was wondering if there will any issues when multiple users are are hitting the website at the same time. I am using I am using FileAppender to log to a single file.Is there a risk of the log file being locked, for data collision..etc. How are log entries captured for all ... |
| 11/06/2007 10:22 AM | Windows service |
| Replies: 0 |
I am trying to use Log4net in a windows service. It works fine when I launch my service in a debug mode, but does not when I run it thought the window service management (run mode). 20 seconds after the start, the service crashes because it raises an unhandled exception named TypeInitializationException. any idea? |
| 11/05/2007 11:16 AM | Could you fix the links under "Example App" page at website? |
| Replies: 3 |
Hi,May I ask you to fix the links inhttp://logging.apache.org/log4net/release/example-apps.html?Seems all of them are broken.Cheers,--DancefireMicrosoft Certified Technology SpecialistCCNAhttp://www.dancefire.org/I'm enjoy in Operating System, Network Security and Embedded System. |
| 11/02/2007 11:58 PM | Bug with IgnoresException |
| Replies: 0 |
Hi,
I’ve tried to log Exception with next configuration
<configuration>
<!-- Register a section handler for the log4net section -->
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
 ... |
| 10/26/2007 1:56 AM | Question about ConfigurationResetEvent |
| Replies: 3 |
Hello, all!
I would like to make use of (and piggyback on) log4net's ability to watch the app config file for changes. I have a Windows Service, which I would like to have the ability to reread configuration on the fly, after I edit the configuration file.
I use the following to init the logger:
log4net.ILog _logger = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrent... |
| 10/25/2007 6:21 PM | UdpAppender uses UdpClient? |
| Replies: 2 |
Hi,We're looking to use the RemoteSyslogAppender from a bunch of Windowsservices running on the same machine, sending log events to one serverlistening to one port. Looking through the source, RemoteSyslogAppenderinherits from UdpAppender, and UdpAppender uses a UdpClient object. IfI try to start two applications on the same machine aiming to send logevent to the same remote sys log I ... |
| 10/24/2007 7:17 PM | Activate/Deactivate Loggers during Runtime |
| Replies: 2 |
Hello! In a project I'm currently working on, I wish to directly deactivate/activate certain loggers during runtime so that for example the server can determine on certain attributes when to log what. I would realize that by using several loggers, however the person I'm doing this for wants me to implement that somehow inside the code. Anyone can give me a starting point here?I've been googling fo... |
| 10/24/2007 6:39 PM | Newbie: Does Log4Net have the concept of "Topics" and, if so, can I route messages based on topic rather than "Class" hierarchy? |
| Replies: 4 |
The title says it all really, I would like to be able to route my messagesbased on a topic rather than the class that posts the message. For example,I have an audit requirement and a log requirement for the same class.When I start/stop a given job, I want to audit that, but I also want torecord job progress within the class via logging. I see my audit and loggingsinks as being different and back... |
| 10/24/2007 5:10 AM | Config log4net in n-tiear application Framework 2.0! |
| Replies: 4 |
Hi everyone!
I want to configure log4net in order to use the same configuration file (with the watch option active) in my n-tier application!
I have the following structure in my solution:
Website (as a web application project)
Business (as a class library project)
Data (as a class library project)
Test (as a class library project)
I want to be able to log ... |
| 10/22/2007 6:18 PM | Application to view output from a RollingFileAppender |
| Replies: 6 |
Hi all,Does anyone know of an application that is capable of loading a log filethat has been written to using the RollingFileAppender? I know there'sthe Log4Net Viewer and Chainsaw, but I think these applications justlisten to UDP packets, and I need to examine historical logs in files.I need a viewer that can display log entries in date order and groupedby thread ideally. Does anyone ... |
| 10/22/2007 6:13 PM | Newbie: Log4Net or MS Logging Application Block? |
| Replies: 14 |
Hello all,I have been asked to compare the Log4Net library with the Microsoft patterns& practices Logging Application Block.I have searched this forum but can't find anyone who has asked this questionpreviously. I would have thought this is a common topic.Does anyone know if this type of side-by-side comparison has been done? Iknow that both are very extensible, but I am interested in compar... |
| 10/22/2007 4:58 PM | Parameterizing appenders with a conversion pattern according to the level |
| Replies: 0 |
Hello,I now have different console appenders according to the specific levelI use. I have a problem appender, an info appender and a debugappender. I use filters and tresholds to limit the levels theseappenders process.However, the only difference between them is the conversion patternthat is used. Info messages are just written to the console, whilewarn or error messages get their level printed a... |
| 10/13/2007 4:47 AM | Custom Appender - Clients still require Log4Net reference? |
| Replies: 1 |
I have a custom log implementation (baseless LogManager, extended ILog and extended LogImpl).
It's working fine. The only problem is that the projects which reference my custom logger, also seem to require that I specifically add a reference to Log4Net. Is there a way to avoid this? In the main entry to the application, I do have a reference to log4net because I did... |
| 10/13/2007 1:30 AM | Using log4net with VistaDB |
| Replies: 4 |
I am trying use log4net to write to a database. The database we are using isVistaDB. I am able to write to a file correctly but I'm getting thefollowing error when i try to write to the VistaDB file:log4net:ERROR [AdoNetAppender] Could not open database connection[Provider=VistaDB.NET20;Data Source=C:\Documents and Settings\First Name\MyDocuments\Visual Studio2005\Projects\TestApp\Te... |
| 10/12/2007 7:59 PM | Clear the content of the log file from the application |
| Replies: 0 |
Hi there!
How can I clear the content of the log file specified in the log4net configuration file, when it is needed in the application(such as some button click event)? RollingFileAppender does not solve the problem because it is needed to stay the log file name always the same. |
| 10/09/2007 9:14 PM | Including PID in log file name -- Locking Models & ASP.Net |
| Replies: 4 |
Short question: Is there a way in the RollingFileAppender to use the process ID (PID) in the file name?
Long question:
We’re using log4net (1.2.10) in several ASP.Net applications. We’re also using the RollingFileAppender rolling daily, and using a static file name, so the current log-file is “log-file.log” and past log files would be “log-file.log.2007-08-10.log” for example.... |
| 10/09/2007 2:31 PM | Try XmlConfigurator.Configure() if logging is not working |
| Replies: 0 |
Greetings,Just spent a few hours struggling to understand why our logging stopped working,having found the solution, thought I'd post here so it may help others.We have a log factory which produces log4net.ILog objects, which is reallyjust a shortcut to the standard approach you see in most examples.So in our framework assembly we have:/// <summary>/// Create log whose name is the calling me... |
| 10/09/2007 7:09 AM | Newbie problem |
| Replies: 2 |
I’m trying to configure log4net for a console application .net 2.0. I can’t even get the simplest configuration to work. I put this configuration in my app.config:
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
&nb... |
| 10/08/2007 3:35 PM | Logging to different files |
| Replies: 0 |
Hello is is possbile to log to more than one file with only one instance of a ILog object in my code? I like to log errors to the default (root) appender and >WARN additional to an other file. Till now i have to use 2 loggers in my code to achive this. _thanks rene |
| 10/06/2007 7:15 AM | How does log4net prevent file corruption? |
| Replies: 1 |
What happens if the power goes out during a particularly intensive disk writeoperation by log4net? Does the file become corrupt? If not, whattechniques does log4net use to prevent this, and can developers apply thesesame techniques to their .Net applications in general?--View this message in context: http://www.nabble.com/How-does-log4net-prevent-file-corruption--tf4578109.html#a1306... |
| 09/21/2007 1:48 AM | Upgrading Oracle |
| Replies: 1 |
I've upgraded the Oracle OPD that my application is using, but am having an issue getting it right for Log4Net. For the AdoNetAppender, I have the following:
<connectionType value="Oracle.DataAccess.Client.OracleConnection, Oracle.DataAccess, Version=2.102.2.20, Culture=neutral, PublicKeyToken=89bf483f429c47342" />
When I run my application, I get the following error from the logge... |
| 09/20/2007 11:11 AM | Can I use static logger and ThreadContext.Properties in asp.net p roject? |
| Replies: 5 |
Dear all:
I am trying to write a log wrap class in asp.net project. I want to use a static logger ,such as public static ILog log = LogManager.GetLogger("XXXX"); Then I want to use log4net.ThreadContext.Properties[Key] to set custom fields. Such as "username". But now, I am't sure if the log is safe in asp.net model?  ... |
| 09/19/2007 1:03 AM | AdoNetAppender and PostgreSQL |
| Replies: 3 |
Hi,I'm trying to use log4net to log events into a database in PostgreSQL. There is no indication in the website if this is supported or example configurations.Is it possible for anyone to tell me if this is possible and, if yes, how? Regards,Nuno |
| 09/17/2007 8:42 PM | Logging to wwwroot location |
| Replies: 1 |
Good Morning,
I cannot write to a log located under Inetpub/wwwroot/WEBSITE/Log/log.txt.
Specifying a location anywhere else works fine.
How can I accomplish this?
Thanks,
Dave K |
| 09/13/2007 1:38 PM | How to get the Lot4Net configaration info in the program? |
| Replies: 1 |
Hi guys:I am using log4net in my ASP.Net project. The Log4Net is configured in theweb.config file. I need to get the Log4Net config info in one of my ASP.Netpages. How to do it? Is there a way to access the Log4Net config info in aprogramming way??CheersZheng |
| 09/12/2007 8:20 PM | Windows: Placing logfiles in Documents and Settings |
| Replies: 0 |
Hi!I want to place logfiles in the Documents and Settings/User/LocalSettings/ApplicationData folder.This folder might be called something else under a spanish Windows. So Ihave to determine thepath during runtime (done withSystem.Windows.Forms.Application.UserAppDataPath). However, sinceI put logging in a .dll assembly (with no Main, thus no best place to callXmlConfigurator),I would like to use t... |
| 09/11/2007 4:56 AM | Trouble using XmlConfigurator assembly attribute |
| Replies: 7 |
Hi…
I’ve got some programs/assemblies that I’m building and for some reason, the XmlConfigurator assembly attribute isn’t working. A couple of the assemblies have
[assembly: log4net.Config.XmlConfigurator(ConfigFile = "App.log4net", Watch = true)]
In their AssemblyInfo.cs files, but when... |
| 08/30/2007 6:26 AM | Write to different Log Files |
| Replies: 6 |
Hi All
I am trying to develop a wrapper logging class in my project. We have multiple class libraries, WCF services, Windows service, Consoles etc in our project and want them to use this wrapper.
I am currently using FileAppenders and my wrapper configures log4net programmatically (threshold level, log file name).
I want every assembly which wants to use this class to log to a different fil... |
| 08/27/2007 9:54 PM | doubt about log4net configuration |
| Replies: 6 |
Hi,
I need some ligths on log4net. A friend of mine told me that we use the log4j and we only configure one file obtaining all log the for the application without adding aditional code lines, including the log of the actions taken in the data base. (INSERT / SELECT / DELETE …)
Konw, i‘m using the DotNetNuke framework to create a portal, and i want to use the log4net to do some ... |
| 08/24/2007 9:48 PM | Error in SqlCeParameter causes error in log4net |
| Replies: 2 |
Hi,
I am having this error:
http://csharponphone.blogspot.com/2006/08/sqlceparameter-bug.html
Are there any fixes for this?
Another thing is that if I adjust my column to a max size of 255 I still get an error if I try to insert more than 255 characters – how do I get log4net to automatically reduce the size of the message to 255 (to cut the last part of the message)?
Best... |
| 08/24/2007 9:02 PM | Release 1.2.11 |
| Replies: 0 |
Hello everyone, somebody know the launch date of release 1.2.11, I needthis release, because I'm using the .net CF 2.0.Thanks and sorry about my english.Facundo |
| 08/21/2007 4:19 AM | Line numbers in release mode |
| Replies: 1 |
I am using log4net to log exceptions, and I thought I saw a way for log4netto get the line number of the exception even if the program was compiled inrelease mode. I know how to get the line number of call to logger.Error(),etc. using patterns, but I want a way to get the line number of theexception without it being in debug mode.Phillip RingSoftware DeveloperHitcents.com |
| 08/20/2007 8:53 PM | log4net WILL NOT write to the log file. |
| Replies: 6 |
To Whom It May Concern:
I have 1st insured that the ASPNET account has write privileges on my \Log subdirectory before I sent this question.
The code fragment I'm using to write with is below. I have also tried example code straight from your samples
to no avail. There is another app running on the same server which has no trouble writing to its log file via
lo... |
| 08/16/2007 4:53 PM | Using XmlConfigurator.ConfigureAndWatch to watch for Config changes |
| Replies: 1 |
I have a ASP .Net 1.1 app which I am using log4net ver 1.2.10.0 with.
I am trying to use the log4net.Config.XmlConfigurator.ConfigureAndWatch(new System.IO.FileInfo(logfile)); method in the Application_Start Method of the Global.asax.cs, but get the following error:
Method not found: Void log4net.Config.XmlConfigurator.ConfigureAndWatch(System.IO.FileInfo).
Description: An unhandled... |
| 08/14/2007 3:42 AM | Setting log levels programatically |
| Replies: 1 |
Hi
I need to set the level for logging programmatically in my code.
I see that the LogManager.GetLogger(logname).IsErrorEnabled or isDebugEnabled is a read only property.
Is there some way to dynamically set the levels for log?
Thanks and Regards
Dipty MaybhateAutomated Precision Manufacturing TechonologyAdvanced Micro Devices
|
| 08/13/2007 10:55 AM | How to use log4net in multi-dll Asp.net project? |
| Replies: 3 |
Now I'm creating an Asp.net project. I create a project called COMMON,I add the log4net.dll to this project and create an interface, soother project can reference this COMMON.dll and use log4net directly.But in Asp.net project, when I use this interface, no log files are generated.How to solve this problem?Thanks. |
| 08/08/2007 5:43 PM | log4net duplicate filtering |
| Replies: 3 |
Hi,I wanted to post the code I'd written for duplicate filtering a couple of weeks ago, but got distracted with some other work. After noticing the recent messages about duplicate filtering, I just figured that posting it in its current state might be of use to people. It's a modified forwarding appender that does duplicate event filtering with a summary message inserted after the series of duplic... |
| 08/06/2007 4:38 PM | Intra-day log space management |
| Replies: 4 |
Hi all,
Hopefully someone will have some helpful advice for me. I'm looking for options for managing log space requirements predominently on an intra-day basis (within the same 24hr period).
One of the qestions I'm being asked about an app I've written is what the log space requirements are which is a difficult question to answer. Normally, they're pretty small but on... |
| 08/04/2007 4:24 AM | Suppress repeated, identical log entries and add a summary log entry |
| Replies: 1 |
I'm trying to design a custom filter using log4net. I'm in the conceptual stageof design and I don't see how I can implement the entire design.The problem is that I want a part of log4net, a filter, to be able to generatelogging entries.I want to make a filter that will suppress identical log messages from the samelogger if they occur too soon after each other, and then emit a log entry whenthe er... |
| 08/04/2007 12:20 AM | UDP Appender Issues |
| Replies: 6 |
Hello,
I’m trying to log events to ChainSaw using the UdpAppender. However, even after following the directions on the web site I keep getting the message:
log4net:ERROR [UdpAppender] Unable to send logging event to remote host ::1 on port 8080.
System.Net.Sockets.SocketException: An address incompatible with the requested protocol was used
at System... |
| 08/03/2007 1:51 AM | Using LoggerMatchFilter |
| Replies: 1 |
I'm looking for a good config example of using LoggerMatchFilter. I am trying to separate difference namespaces into separate logfiles and I see lots of references to LoggerMatchFilter and Repository but I can't find any practical examples that actually get them to work.
_________________________________________________________________________... |
| 07/31/2007 8:16 PM | Add or change parameter value dynamicly |
| Replies: 2 |
Hello. I have a table T_Audit where i want to write my log messages in oracledb. it has a field processid that i want to put dynamically its theidentifier of the process that is doing log not the real process just the idof process table from my database so i decide to write my appender like this <appender name="AdoNetAppender_Oracle"type="log4net.Appender.AdoNetAppender"> &... |
| 07/30/2007 10:20 PM | using log4net on Windows Server 2003 |
| Replies: 5 |
Hello Everyone,I am still having problems using log4net on IIS 6.0 on windows server2003. I gave the Network Service User write permissions, however thelogging still does not work, does anyone have a fix for this?Regards,John |
| 07/27/2007 9:02 PM | what will the inlisted changes in log4net code affect |
| Replies: 2 |
1.remove the extra catch block usedlike a catch block from the code belowcatch(Exception ex){log4net.Util.LogLog.Warn("StringFormat: Exception while rendering format["+format+"]", ex);return StringFormatError(ex, format, args);}catch{log4net.Util.LogLog.Warn("StringFormat: Exception while rendering format["+format+"]");return StringFormatError(null, format, args);}2.Change in config.csSyst... |
| 07/27/2007 2:23 PM | Disable/enable appender for all loggers |
| Replies: 7 |
Hello, I am using three appenders in my log4net configuration (see bellow). But I need programatically disable and reenable RollingFile appender at certain situations. Is there any simple solution? I tried to use programatic configuration only.
My config: <log4net> <appender name="Console" type="log4net... |
| 07/27/2007 12:28 AM | way to log debug output from unmanaged code? |
| Replies: 3 |
Is there a way to listen to debugoutput from an unmanaged c++ DLL? Ididn't see anything on the web site or mailing list archives. ie, something similar like sysinternals DebugView. The c++ code wouldcall OutputDebugStringA. Or is there another way to do it?Thanks,Dan |
| 07/26/2007 11:26 PM | RollingMode Once and Size |
| Replies: 0 |
I know the RollingMode on a RollingFileAppender can be set to Once, Size, Date and Composite, but is there any way to have it set to (Once | Size) so that it rolls once the application starts AND if the file size is ever reached?
John VanderKolk
john.vanderkolk@compuware.com
The contents of this e-mail are intended for the named addressee only. It contains information that may be confidential... |
| 07/26/2007 1:14 AM | Meaning or use of the Property NDC |
| Replies: 1 |
hi all. Does anyone know what the property NDC is, and why it returns nullwhenever i log on an asp.net 2.0 web application?thanks guys.--View this message in context: http://www.nabble.com/Meaning-or-use-of-the-Property-NDC-tf4144628.html#a11788506Sent from the Log4net - Users mailing list archive at Nabble.com. |
| 07/25/2007 9:31 PM | Can the latest build of log4net be used in x64 platform? |
| Replies: 0 |
Currently we are having a consolidation project where we need to move all ourapplications into a new environment.All the servers in the new environment will be x64.Can the latest build of log4net used in the x64 platform?Thanks.--View this message in context: http://www.nabble.com/Can-the-latest-build-of-log4net-be-used-in-x64-platform--tf4142231.html#a11782720Sent from the Log4net - Users maili... |
| 07/25/2007 7:42 PM | File Paths |
| Replies: 2 |
Hello,
I’m writing a logger utility for a solution that has several different points of execution. They will all be under some particular folder, but relative to this folder their locations are different. All of these applications are to read the same config file which specifies locations for file appenders, one for each of the points of execution.
My problem is that since log4net reads the pa... |
| 07/25/2007 12:19 AM | Logging several IIS apps. |
| Replies: 2 |
Can anyone give me an example of how we would have one localized configuration script or DB repository to control logging within an IIS Web Server framework? Right now we’re maintaining a logging.xml for each application (virtual directory, alias, etc.) in our system. I’d like to move it all to the wwwroot folder and have one instance, is this possible?
I’ve been using the assembl... |
| 07/24/2007 11:05 PM | LevelMatchFilter gone? |
| Replies: 1 |
We seem to be getting flooded with messages in our logs since we upgraded to the newest version.
Our configuration files have the following format:
<filter type="log4net.Filter.LevelMatchFilter">
<param name="LevelToMatch" value="FATAL"/>
</filter>
I’m seeing on the web instances where the following format is being used:
<filter type="log4net.Filter.LevelMatchF... |
| 07/20/2007 2:04 AM | Application being the remoting server |
| Replies: 1 |
Hello,Looking through the docs and examples, it seems that you need to have aremoting server already running to have an application use aRemotingAppender to send messages via remoting. I have another need, Iwould like my application to sort of be a server, to wait for a clientto connect, and then send messages to that client. I did this severalyears ago with Sockets, but is there a way... |
| 07/20/2007 1:08 AM | configuration file question |
| Replies: 3 |
Hi,Read through the docs and couldn't find the answer...1. Let's say I have 2 appenders, and I want to have the same logger senddifferent levels to different appenders, but it does not appear to work,nothing is going through. Is this possible? If not, is there anotherway to accomplish this? I was considering putting it as a filter on theappender, but I would like other loggers at... |
| 07/19/2007 9:13 PM | plugins |
| Replies: 1 |
I've written a forwarding appender that filters out sequential duplicate events. It's designed to be inserted in the chain before an SmtpAppender to prevent mail recipients being flooded with many identical mails. When the stream of dupes is over, the appender inserts a 'summary event' that describes how many duplicates were filtered out. During development, I copied and renamed ForwardingAppender... |
| 07/19/2007 6:00 AM | ADONetAppenderParameter: Accessing Properties |
| Replies: 0 |
Hello: I am trying to figure out how to set the AdpNetAppenderParameter values in the
log4net.config file to use properties of a class inherited from LoggingEvent.So, I understand that be default, setting up a parameter in the config can look like this: <parameter> <parameterName value="@message" />
<dbType value="String" /> <size value="4000" /> <la... |
| 07/18/2007 7:03 AM | Building A Custom Logger |
| Replies: 4 |
Has anyone had experience building a custom logger?Here is what I am doing. I have created my own interface describing what the kinds of things a logger needs to be able to log in my environment (let's call it IInterface) like security audits, performance statistics, etc. This interface extends ILog as well. Thus: IInterface : ILogThen, I have an implementation of IInterface and we'll call that In... |
| 07/17/2007 10:34 PM | Log4net Appender problem under Linux (mono 1.2.4) |
| Replies: 0 |
HiI have created a simple project for test purpose to test the UDP appenderof the Log4net.For that I have created a simple UDP server listnening on a pre-configuredport.Another widnows client application sends over Log4net UDP APpender messagesto the server. Here is my appender Log4net configuration:<appender name="UdpAppender" type="log4net.Appender.UdpAppender"> &nb... |
| 07/17/2007 8:07 PM | Permission problem with RollingFileAppender |
| Replies: 1 |
Hi all,I have an ASP.NET 2.0 application programmed in VB using log4net. Itproduces logs on the ASP Trace, and also on a RollingFile Appender. Thefile appender works fine logging to a network drive from my developmentmachine using Visual Studio development server, and also to my C driveusing local IIS server, but not when running on the UAT remote servermachine to the same network driv... |
| 07/13/2007 2:48 AM | How is Layout Read In Using The ADONetAppender? |
| Replies: 0 |
Hello All: Currently I am looking into extending some log4net capabilities around using the AdoNETAppender to accommodate my table structure.There is one thing I am having a hard time grasping and that is how the values for the parameters in an AdnoNetAppender are read in. Consider t he following declaration of an AdoNetAppender in t he log4net.config:<appender name="Ado... |
| 07/10/2007 11:34 PM | Problem on Windows 2003 Server |
| Replies: 5 |
Hi,
I am having problems getting log4net to work on IIS on windows 2003 server, it works fine on IIS on my XP, but not on my windows 2003 server.
Regards,
John Muirhead
Software Architect
TSL Jamaica Ltd.
Office (876) 9688988
Cellular (876) 3721549
|
| 07/09/2007 6:19 PM | AdoAppender : limit number of rows in the database |
| Replies: 0 |
Hello,The AdoAppender for Oracle 9i is working fine for me but I'd like to know ifit's possible to limit the number of rows in the database like for a rollingfile appender (i.e. when there are more than 1000 rows in the LOG table, ateach new log to write, the oldest log row is erased from the table).Thanks,Romain--View this message in context: http://www.nabble.com/AdoAppender-%3A-limit-number-o... |
| 07/09/2007 5:37 AM | Making SMTPAppender Send Exactly One Email |
| Replies: 6 |
Hi,I've read the documentation, but didn't manage to figure out whether thefollowing is possible - and if so, how:I have an application that uses Log4Net (d'uh) and I'd like it to sendme an email with all error messages of one application run.The reason is that when for instance the database dies, I'd get LOTS oferror messages and I don't want to get thousands of emails about that.One email would ... |
| 07/06/2007 3:56 AM | ConfigureAndWatch for a web app ... |
| Replies: 3 |
I am attempting to use the method XmlConfigurator.ConfigureAndWatch for a web service application. In the Application_Start method in Global.asax, I have change from:
XmlConfiguration.Configure();
To:
XmlConfigurator.ConfigureAndWatch(“web.config”);
However, log4net appears not to configure properly. I suspect that log4net cannot find ‘web.config’ ... |
| 07/04/2007 5:43 AM | no log file is being created, I am stumped |
| Replies: 0 |
This seems to happen EVERY time I use log4net in a new program. Itake the app.config from an existing project, change the appender nameand the name of the log file and NOTHING happens! I don't get a logfile! Once I get it going, it works GREAT and I love it, it is justthe getting it working! And at 5:30pm on the 3rd of July, I hategoing home with code that doesn't work, but... |
| 07/04/2007 12:55 AM | File Release Handler |
| Replies: 0 |
Hi again all,
Does anyone know if there's an easy way of creating an event handler to wait for a file to be released by an external application?
I'm using an ExclusiveLock model on a RollingFileAppender. The problem is if the file is opened by an external program that enforces a lock on the file, for example Word, when I try and lock my appender I cannot. I was wondering if there was a watcher ... |
| 07/02/2007 8:23 PM | Changing LockingModel at runtime |
| Replies: 0 |
Hello all,
If in my config file I set all of my appenders as MinimalLock appenders, is it possible to later set a specific appender (which I already have code to grab) over to an ExclusiveLock? Also, if I set my config file as a read and watch, when/if it reloads the config file, will the appender be moved back to a MinimalLock, and if it will, is there any way of preventing this?
What would th... |
| 07/02/2007 5:28 PM | Negative precision modifier for pattern layout |
| Replies: 3 |
Hello list!The 1.2 SDK reference states that the logger and type conversationpatterns of the pattern layout accept a precision modifier.Is it possible to specify a precision that will _remove_ the n left mostcomponents? E.g. if logger is "foo.bar.baz" "%logger{-1}" would resultin "bar.baz".We typically use one appender per module namespace so that everythingfrom the "company.product.module.*" name... |
| 06/29/2007 7:34 PM | Log4Net Issue on Windows 2003 Server |
| Replies: 6 |
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 t... |
| 06/28/2007 9:43 PM | Multiple connections to same file |
| Replies: 1 |
Hello,
I'm working on a project that involves multiple solutions logging to the same files. It seems that if two different executables try to log to the same file through a RollingFileAppender, only the one that first gets configured is allowed access and the other has to wait until the first releases its hold on it. Is there any way to allow both of them to have write access to the same file? W... |
| 06/27/2007 10:10 PM | Path Sentinels |
| Replies: 1 |
Hello all,
I know that ${TMP} is valid and evaluates to the user's temp directory when used in the config file for a location of a file appender. What is/where can I find a list of all such sentinels I might be able to use, and is there a way of knowing which of them will be able to be accessed be ASPNET user by default without testing them all?
John VanderKolk john.vanderkolk@compuware.com The... |
| 06/26/2007 3:24 PM | Logging problems |
| Replies: 0 |
Hi all,
I am using Log4net 1.2.0.30714 version in the web application which is developed in .NET 1.1. Log messages are logged properly with out any problem when the application is started. But Log stopped writing after some time. I don't know why this happened.After this I enabled Internal debugging in Log4Net and wrote the Trace output to a new text file.from that file I was not able to spot out... |
| 06/21/2007 11:54 PM | no log file is created |
| Replies: 14 |
Dear all,I use to work with Log4j but I am new to Log4net. I try to setup a smallexample but no file is created while logging, though the line with thelog instruction is executed. This is my setup, any hint? Thank you inadvance.*** web.config ***<configuration> <!-- Register a section handler for the log4net section --> <configSections> <section n... |
| 06/21/2007 12:29 AM | Custom Parameters Not Working |
| Replies: 1 |
Hello Everyone:
I am having a problem getting Log4Net to log because a particular Guid parameter I am using.
Here is what I have in my config file:
<parameter>
<parameterName value="@messageID" />
&nb... |
| 06/15/2007 10:45 PM | Reading config in business layer |
| Replies: 6 |
Hi,
I have asp application and writing new module in asp.net; how can I use config settings for appender? I like to use rollfileappender.
I module is class library and tried to add app.config and app.log4net but it's not exe or web so can't read the configuration.
So my question is how to set xmlconfigurator to read config file?
Here is my test class and config file (simple) usin... |
| 06/13/2007 12:29 PM | MbUnit and log4net configuration |
| Replies: 0 |
I'm using log4net version 1.2.10.0 on MS .NET 2.0. My assembly type isan MbUnit (unit test) DLL. I'm launching it using TestDriven.NET. Thetest code is exercising our framework library.The question I have is about how the log4net configuration gets loadedin this instance.If I use MbUnit in its default, which launches tests using amultithreaded apartment (MTA) then none of the log... |
| 06/08/2007 10:56 PM | Can't Get Logging Working in Web Service |
| Replies: 1 |
Hello everyone:
I have tried to enable logging and even the internal debugging of log4net in my web service but I cannot seem to get it to work.
Here is my log4net.config file:
<?xml version="1.0" encoding="utf-8" ?>
<configuration> &nbs... |
| 06/05/2007 9:05 PM | aspnet_regiis |
| Replies: 3 |
We are using version 1.2 of log4net. I have a question regardingaspnet_regiis that allows the encryption of portions of the web.configfile. I am trying to run the following command which is supposed toencrypt the log4net section of the web.config:C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -pe"log4net" -app "/encrypt_florida"It errors with:Encrypting configuration s... |
| 05/29/2007 10:19 AM | Log4Net Can Not Log Message When AppDomain Unload , Why? |
| Replies: 4 |
Hi everyone,Details:I used Log4Net for Asp.Net Application under version 1.1.4322.I want to log the Session_End event in the Global Class by the command line "iisreset".but the infomation can not be loged. In the another , the Session_Start event information can be loged correctly.below is the code: using System;using System.Collections;using System.ComponentModel;using System.Web;using System.Web... |
| 05/23/2007 1:54 AM | Customizing Parameter |
| Replies: 1 |
Hello:
When I make a log entry I would like to add a transaction id to the database as well ( using AdoNetAppender of course ) so that it allows me to go back later and trace through a process to see where it succeeded and where it went wrong. I se there is not problem in specifying this parameters at run time. Along with the following code in the config file:
... |
| 05/22/2007 9:39 PM | UDP Appender |
| Replies: 1 |
Hello, I am trying to put the UDP appender to work on my application. Unfortunately, It seems it cant find the ChainSaw endpoint, or may be it is not even sending the UDP message. Unfortunately, I can not monitor localhost udp messages to comment on the UDP issues. &nbs... |
| 05/22/2007 10:52 AM | a bug in log4net.Util.Transform |
| Replies: 0 |
Hi, There is a clerical error in log4net.Util.Transform at line 193. The regular express is written as "[^\x09\x0A\x0D\x20-\xFF\u00FF-\u07FF\uE000-\uFFFD]". According to the definition of XML characters, "\u07FF" should be "\uD7FF". log4net version: 1.2.10Regards,Alan |
| 05/21/2007 10:25 PM | RollingFileAppender truncating loosing data? |
| Replies: 0 |
Hello,we have a system that we are testing in production and I noticed aproblem since yesterday. Upon browsing the logs I started tail:ing themain one. The last log entry before was from 09:56 yesterday.I then generate some more traffic, tail informs me that the file wastruncated (ie log4net/rollingfileappender shuffled the logdata around).When I revisit the previous log file (the one before the c... |
| 05/21/2007 6:53 PM | NullReferenceException in RollingFileAppender |
| Replies: 3 |
Hi everyone,
I’m trying to do something which (I hope) is fairly simple, however in the output from my application it seems that the RollingFileAppender always throws a NullReferenceException in its OpenFile method. Here’s the exception output:
log4net:ERROR [RollingFileAppender] OpenFile(C:\Documents and Settings\bart.read\Local Settings\Application Data\Red Gate\ourap... |
| 05/16/2007 4:48 PM | RollingFileAppender cannot create file in .NET CF |
| Replies: 0 |
Hi all, I have a problem with logging section of my compact framework application. First things first; my environment involves: log4net 1.2.10, .net compact framework 2.0 SP2, windows mobile 5.0 and assembly type is DLL. I'm using rolling file appender with internal debugging but either this debugging output(log4net.txt) nor logging file(log.txt) hasn't been created on device. O... |
| 05/15/2007 5:15 AM | Is there any plan for the next log4net release? |
| Replies: 0 |
Is there any plans for the next log4net release?What the status of 1.2.11?--View this message in context: http://www.nabble.com/Is-there-any-plan-for-the-next-log4net-release--tf3754947.html#a10612272Sent from the Log4net - Users mailing list archive at Nabble.com. |
| 05/14/2007 6:32 AM | Calling a stored procedure with input parameters from commandText |
| Replies: 0 |
Using Oracle 10g and log4net 1.2.9, I am trying to call a stored procedure with a parameter as following in the config file using ADONetAppender but i am not able to get that entry in my database, at the same time i am able to get that in the text file where i am looging using RollingFileAppender as follows ... |
| 05/12/2007 12:42 AM | PatternLayout and ProcessId/PID property |
| Replies: 0 |
I need to expose the processID when logging, but I am not seeing how todo this with a layout type of "PatternLayout". My conversion pattern of:<conversionPattern value="%appdomain %property{log4net:HostName}%processid 0000 %location | %message"/>Results in:MYAPP.EXE MYMACHINErocessid 0000 actual-location-text |actual-message-textI see google-hits where people are referencing the PID in theRo... |
| 05/11/2007 7:35 AM | Compact Framework 2.0 Build?? |
| Replies: 1 |
Hi all,I've dug around the Apache log4net site and am not seeing a CompactFramework 2.0 build available. Can someone point me to it if it existsplease? If it does not, is there a reason?Thanks,Jon |
| 05/08/2007 11:08 PM | IAppender, IOptionHandler oddity |
| Replies: 2 |
Hi all, In our software, we implemented a custom database appender that implements the IAppender, IOptionHandler interfaces, it's called "ApplicationErrorDB". Now this class is not only used by log4net, but I also directly access it through our code as well because I added some additional methods for our software to use. Anyway, one of my method threw an exception when one of our beta tester... |
| 05/08/2007 4:56 PM | FileAppender ExclusiveLock |
| Replies: 0 |
HiI am using "RollingFileAppender" of "incubating-log4net-1.2.9-beta" version in my Product.I found by default, the appender open the file in "Exclusive lock" mode only, in which the fileStream is opened in Read share mode only.As a result of this log files created by this appender can be opened in notepad, but user cannot delete or rename these files.My scenario is like this:In order to see... |
| 05/05/2007 3:23 AM | RollingFileAppender: Date/Time based rolling doesn't work |
| Replies: 3 |
Log4Net 1.2.10.In an ASP.NET web application I've configured a RollingFileAppender to rollevery day. It works fine on my development server.On the production server, I never see a rolled file - instead it alwaysappends to the configured log file.The main difference I can see is that the ASP.NET application is restartedevery night on the production server. Access to the application andt... |
| 05/03/2007 4:43 AM | Help needed with log4net |
| Replies: 2 |
Hello,
I am using log4net to log messages in my web application. Logging messages is working exactly the way I need, but sessions are getting expired when I log the messages. Sessions are working fine if I do not use log4net. Could you please help me solve this issue.
This is my configuration in my web.config
<configSections>
<section name="log4net" type="Syst... |
| 05/02/2007 10:28 PM | Need help on testing dll, that uses external configuration file, using Nunit. |
| Replies: 10 |
I have extended the log4net , to suite my requirements.Now I want to write, the unit tests for that library, using externallog4net configuration file.I want to use Nunit. My question is how to test my dll, with the use ofexternal log configuration file. Could you point me in the right direction.In my extension dll, the code looking for the config file, in basedirectory, but not successfull... |
| 05/01/2007 9:45 PM | Multiple repositories |
| Replies: 2 |
Hello. After understanding how i can use Repository attribute for creatingindependent logging and checking different scenarios of configuration Ifound that i can "apply" the application's configuration to be the 3rd partylibrary's configuration by adding AliasRepository attribute in theapplication's code.What if i have two 3rd party libraries with different repositories definedand want them to u... |
| 05/01/2007 1:35 AM | %l to %level difference.. |
| Replies: 2 |
Hi,I'm having an trouble with %l and %level specifiers. MyRollingLogFileAppender is as below:[CODE]<appender name="RollingLogFileAppender"type="log4net.Appender.RollingFileAppender"> <file value="..\\Logs\\CurrentLog.log" /> <appendToFile value="true" /> ... |
| 05/01/2007 1:29 AM | AdoNetAppender for SQL db issue |
| Replies: 2 |
Hi Log4Net developers/users,I'm currently developing a logging mechanism for our company and I'm havingan issue with the below code - its not working!![code]<appender name="AdoNetAppender" type="log4net.Appender.AdoNetAppender"> <bufferSize value="100" /> <threshold value="WARN" /> &n... |
| 04/30/2007 6:07 PM | 3rd party assembly logging |
| Replies: 0 |
Hello. I failed finding a clear answer to my question here, though there areseveral posts that touching the subject.I have a set of shared assembly which use log4net. However, the applicationdoes not have to use it as well i do not want that the log4net configurationof the application will dictate logging behavior of the shared assembly. Inthe case the developer wants to output log from the shar... |
| 04/30/2007 6:07 PM | 3rd party assembly logging configuration |
| Replies: 8 |
Hello. I failed finding a clear answer to my question here, though there areseveral posts that touching the subject.I have a set of shared assembly which use log4net. However, the applicationdoes not have to use it as well i do not want that the log4net configurationof the application will dictate logging behavior of the shared assembly. Inthe case the developer wants to output log from the shar... |
| 04/27/2007 8:19 AM | Website content errors/ambiguity |
| Replies: 1 |
Hi,
I’ve found this comment on your website that is confusing to me.
On http://logging.apache.org/log4net/release/features.html#context, the text “is can” makes it contradictory, which one is it?
“Logging Context
log4net can collect logging context data in a way that is transparent to the developer at the point of logging. The GlobalContext and the ThreadContext allow the app... |
| 04/27/2007 5:27 AM | Event ID's in the EventLogAppender... |
| Replies: 2 |
I'm probably missing it, but are there any samples of specifying the EventID with the EventLogAppender? If so, could you point me at them?
Thanks!
Rory |
| 04/24/2007 4:42 PM | Configuration problems |
| Replies: 2 |
Dear all,
Recently, I seem to have problems configuring the log4net. I am using Visual Studio 2003 and am developing a rich client application. I depend on the logs to tell me what the errors are when troubleshooting by remote.
When I configure the settings using the xml in the app.config file, it works fine without problems for users who have administrator privileges
... |
| 04/24/2007 12:40 AM | Is there a way to use log4net without the App.Config file all-together? |
| Replies: 4 |
Hi All:
Maybe you can point me in the right direction. I’m using .NET 1.1 and log4net 1.2.
I was able to get log4net integrated into a WinForms application in C#. My manager asked if I could completely remove all log4net dependencies to the App.Config file.
I was able to pull out all of the entries in between:
<log4net>
….
</... |
| 04/21/2007 10:18 AM | "A log4net appender that uses SmtpClient" blog post about SmtpClientSmtpAppender for sending SSL mail in 2.0 |
| Replies: 0 |
Ted Graham posted code for a SmtpClientSmtpAppender that extends the SmtpAppender by using the SmtpClient from .NET 2.0 to communicate over SSL with a mail server:http://weblogs.asp.net/tgraham/archive/2007/04/20/a-log4net-appender-that-uses-smtpclient.aspxAn additional option would be to be to send all the log messages as a file attachment (and/or zipped file attachment) and only include the most... |
| 04/20/2007 5:47 AM | asynchronous http logging |
| Replies: 1 |
Reposting - I apologize for the previous HTML post. Hit send too early. Anyway...We are looking at log4net as a new logging app but are really interested in something that will allow us to handle all logging asynchronously. Basically, we want the HTTP request to complete without waiting for the logger to finish. I was reading in the documentation about logging in multi-thre... |
| 04/20/2007 1:38 AM | ArgumentNullException on log4Net.LogManager.Shutdown() |
| Replies: 0 |
Hello, I am new to log4net and am looking for some advice on how to avoid an exception.
I am trying to get the logging for several apps to the same log file through your remoting appender. Everything works wonderfully until I move to shutdown the LogManager.
I initialize my LogManager as follows:
void Initialize()
{
System.Configuration.Configuration config = System.Configu... |
| 04/18/2007 5:55 AM | Cannot create log from vb.net class library .dll |
| Replies: 4 |
I have created a web service and web service client that both utilize log4net nicely. The service side utilizes a class library .dll which I’ve also attempted to use log4net for logging. I have been unable to create a log or write to the referring web service log from the class library yet.
Here’s a stripped down version of the current class library dll code:
... |
| 04/17/2007 6:13 PM | Re: Visual Web Express Edition Sample |
| Replies: 2 |
2007/4/17, Antonio Jimenez <superantonioxp@gmail.com>:> Hi>>>> I'm developing using the visual Basic Web Express Edition and I need> to use log4net. Could you sent me a log4net sample for this vb> edition?>>>>>> Thanks>>>> Antonio jimenez>>> --> Antonio Jimenez> 677 55 33 35>>> --> Antonio Jimenez> 677 55 33 35&... |
| 04/11/2007 1:21 AM | Question about rollingfileappender |
| Replies: 1 |
I want to use RollingFileAppender class but I want to log the messages in aRSS based format. I tried extending from RollingFileAppender and overridingthe Append method, but was unable to do much except call the base classAppend method. Is it possible to write to the file that is maintained inthe base class without calling base.Append?--View this message in context: http://www.nabble.... |
| 04/06/2007 3:18 AM | Logging large messages using ADO.NET appender |
| Replies: 2 |
Hi,
I am trying to log a large XML message whenever there is an exception in our application. I have defined my table as follows, i.e. setting the Message column as ntext.
CREATE TABLE [dbo].[ Log](
[Id] [int] IDENTITY(1,1) NOT NULL,
[Date] [datetime] NOT NULL,
[Mac... |
| 04/05/2007 4:37 AM | FileAppender+MinimalLock not working as expected |
| Replies: 11 |
Hello,
I have an WinForms application in C# that generates data files for a graphing application. This application uses log4net to log progress, information, errors, etc. I also want this application to be able to view the log file. When I try to open the log file I get the following error message:
The process cannot access the file “C:\....\MyApplication.log”... |
| 04/05/2007 4:31 AM | FileAppender ExclusiveLock workaround (Not MinimalLock) |
| Replies: 6 |
Hello,We used to use a really old version of log4net (1.2.03) but have sinceupgraded to 1.2.10. With the old log4net we created a custom FileAppenderso that different application domains could log to the same file (this wasbefore the days of MinimalLock). Basically, what we did was to override theOpenFile method to open the file stream in share mode, thus allowing manyprocesses to wr... |
| 03/30/2007 7:06 PM | Logging in dependency of release or debug mode |
| Replies: 1 |
Hi,can I use log4net to log something in dependency of the VisualStudio releasemode or debug mode?Example:I don't want the end user to see notice logs when he uses the release build.How can I config this?Thanx!!! |
| 03/26/2007 7:25 PM | buffering appender :auto flush as a function of logging level? |
| Replies: 1 |
Hello, I have a feature request for the buffering appender.It would be nice to have a way to state in the config file that we would like all levels above a certain level to be flushed automatically for the buffering appender. For example, in some applications logging at the Error level or Fatal levels represents critical information, so it would be nice to flush these automatically.cheers,shelby |
| 03/22/2007 3:22 PM | logging from diffrent levels to diffrent appenders |
| Replies: 1 |
Hello,
Is there a way, on the same logger,
to log Error level to the console and Warning(and above) level to a file?
Thanks,
Adi |
| 03/21/2007 11:16 PM | obtaining line number information on CE using pdb files |
| Replies: 0 |
Hello,I was wondering if it is somehow possible to get line number information on Windows CE 5.0 (.NET compact framework) particularly for exceptions by using the pdb files. I tried copying the pdb files to the executable's directory with no luck. I know StackTrace info is not available on the compact framework, but I thought there might be a work around to get this information for exception... |
| 03/21/2007 9:05 PM | System.Trace.Diagnostics to log4net |
| Replies: 2 |
Hello,I would like to get diagnostics messages (for different wcf services)routed to log4net and then to the log4net appenders.Is there a standard way to do this? Basically, I need a tracelistenerfor the system diagnostics trace system that sends the messages on tolog4net. A Log4NetListener.Any help appreciated!Best regards,/mawi |
| 03/21/2007 2:04 PM | Logging in different files |
| Replies: 0 |
Hello, I am using Log4Net, I want to log the info in the seperate file and the error or debug related info in seperate file, I am successfully able to generate both files, but the problem is that both files contains both information like INFO and DEBUG log..I want to seperate it and wants to log DEBUG info in DEBUG file I am using RollingFileAppender. Please Help Thankx and best regards Austi... |
| 03/19/2007 8:08 PM | InvalidOperation: Collection was modified |
| Replies: 8 |
We are using log4net for several months in production environment. Andsometimes we are received a message error "InvalidOperation: Collection wasmodified; enumeration operation may not execute". This message is providedby log4net. Someone knows this problem ?Thank you--View this message in context: http://www.nabble.com/InvalidOperation%3A-Collection-was-modified-tf3426882.html#a9551617Sent from... |
| 03/16/2007 10:15 PM | Specifying a different directory for logs |
| Replies: 1 |
Hi,
Is it possible to write logs to a different directory other than the executing assembly directory?
We are using the rolling file appender.
Regards
Paul Brine
Wayfarer Transit Systems Ltd
*** This email may contain confidential information and/or copyright material. This email is intended for the use of the addressee only. Any unauthorized use m... |
| 03/12/2007 10:52 PM | RemotingAppender - Server failure |
| Replies: 0 |
Hi eveyone,I am starting to test log4net to manager logging stuff for a .Netapplication.I want to write a sample to valid a technical point.A Server is launched to listen for logging events;The client starts a "stress test" against the server, which must be abble tologin a database or in simple text file.I want to know if log4net knows how to manage a network failure or a servershutdown.Is log4n... |
| 03/07/2007 4:35 PM | objectDisposedException on compact Framework 2.0 |
| Replies: 0 |
Using Windows CE and the compact Framework 2.0 , I get an ObjectDisposedException in the class QuietTextWriter .This occurs on program termination when I use a FileAppender. There is no functional consequence to my program since it only occurs at the end. The error occurs in the Close functionoverride public void Close() { &n... |
| 03/07/2007 2:54 PM | XmlConfigurator not an attribute class? |
| Replies: 1 |
Hi all,
I'm trying to add an xmlConfigurator in AssemblyInfo.cs but to no avail. I tried the online examples which is to:
[assembly: log4net.Config.XmlConfigurator(
ConfigFile="Log4Net.config",Watch=true )]but the compiler complained taht XmlConfigurator is not an attribute class. I'm doing a C#.net proj using VS2005.
How can I specify correctly in the assemblyinfo.cs to make ... |
| 03/07/2007 10:49 AM | log images to sql server using log4net |
| Replies: 0 |
Hi
Is it possible to log images to sql server using log4net AdoAppender?
Newbie,
Thanks
Never miss an email again!Yahoo! Toolbar alerts you the instant new Mail arrives. Check it out. |
| 03/06/2007 4:50 PM | using L4N to view RollingFileAppender with log4net.Layout.PatternLayout |
| Replies: 0 |
Hi, How do I configure L4N to read RollingFileAppender log with layout type="log4net.Layout.PatternLayout"? Thanx for all helps! |
| 03/06/2007 8:07 AM | Programmatic config and thread safety |
| Replies: 2 |
I am currently designing the logging componet of a larger software project (C#, .NET 2.0, Log4Net 1.2.10). It's basically a custom logging API which uses Log4Net behind the scenes. The project involves multiple processes, some of which have multiple threads. It is also a requirement that all configuration must be done programmatically rather than with a config file (... |
| 02/27/2007 11:19 PM | Configuring from code |
| Replies: 4 |
I need to configure log4net from code, to verify that some of my code is output the correct log messages.The issue is that I basically wants to do something like:EnableLogsFor("MyLogger");//run testStopLogging();The real problem is that the amount of logs that are generates is fairly huge, and I want to be able to open just one, and close just one, without impacting anything else.Any ideas how I c... |
| 02/23/2007 5:56 PM | RollingFileAppender and Windows service |
| Replies: 0 |
Hi, I'm writing an application that is running within an AppDomain that has been created by a Windows service. This framework is calling XmlConfigurator.ConfigureAndWatch and sets the ApplicationBase for my software to AppDomain.CurrentDomain.SetupInformation.ApplicationBase. In my log4net config file I'm using RollingFileAppender that is described in the examples. And I've got the following behav... |
| 02/23/2007 3:41 AM | Problem if Log4Net is used in to different DLLs within a project |
| Replies: 5 |
Hallo,I am having an application, WindowsForms .NET 2.0, which uses different DLLs.Everything is working as long as I use Log4Net just within one DLL.Trying to use Log4Net with 2 or more DLLs by using a DLLName.dll.config file for each DLL,configured within the AssemblyInfo.cs result in not having any logging output.Moreover, just using Log4Net within 2 different DLL with having just 1 DLL set up ... |
| 02/20/2007 4:46 PM | Documentation on reconfiguring and isdebugenabled |
| Replies: 0 |
Hello,I would like to get the following test to pass, I've searched thearchives and cannot find a definite resolution. Hierarchy repository =(Hierarchy)log4net.LogManager.GetLoggerRepository(); repository.Shutdown(); &nbs... |
| 02/15/2007 6:52 PM | RollingFileAppender: date based roll |
| Replies: 1 |
Hello, is there any possibility to configure RollingFileAppender(configured to roll every day) to use directory name based on current date?I wish to log to 2007-02-15\test.log.2007-02-15I have tested solution based on PatternString in file element (seebellow), but it is not functional. The fileName pattern is parsedexactly at program start and it never changes if program is runningthrough midnight... |
| 02/13/2007 11:09 PM | Installation problem with Log4Net Dashboard 1.2: Object reference not set to an instance of an object. |
| Replies: 2 |
Dear mailing list, I'm getting into troubles installing Log4Net Dashboard 1.2 on a Windows 2003 server that runs IIS 6.0 with .NET v1.1.4322. After installing the software using the installation files from http://www.l4ndash.com/Download/tabid/53/Default.aspx, the URL http://localhost/l4ndash returns the following error: Server Error in '/L4NDash' Application. -------------------------------------... |
| 02/12/2007 9:17 PM | ReSharper log4net support |
| Replies: 2 |
Arp Another ReSharper Plugin aplha1 availableThis version contains log4net support.There are xml configuration features: 1. Code completion for tags, attributes and attribute values 2. Navigation for types and appenders 3. Search (Find Usages) 4. Highlighting 5. Hints 6. Basic validation for parameters valuesRequrements&... |
| 02/09/2007 2:04 PM | Locking and multiple projects fileAppenders |
| Replies: 2 |
Hello, I am having the follwing .net solution: - 1 web application (asp.net 2.0) - 1 console application I am using log4net v1.2.9. Both have their own .config files and both are using a FileAppender with xml layout. The problem is that I cannot use 1 file for both FileAppenders, even when using MinimalLock. The web.config looks like: The ap... |
| 02/08/2007 2:23 PM | Calling Configure serveral time |
| Replies: 9 |
Hi, AllI want to use log4net in my component that will be hosted in an application.I'm going to initialize log4net with XmlConfigurator.Configure(fileName) whenmy object is being constructed. The point I'm not sure of is my object can becreated several times by the application. The application does not use log4netitself. Is there any pottential problem calling XmlConfigurator.Configureseveral time... |
| 02/07/2007 5:41 PM | How to save changed configuration to app.config? |
| Replies: 3 |
HelloI am using app.config for configuration of log4net.Reading my loggers, appenders and so on is O.K.Changing the values on runtime is also O.K.But how to save the changed values to app.config?Thank youHelmut |
| 02/06/2007 10:08 PM | Validating log4net configurations |
| Replies: 1 |
Hi All,
While log4net operates as expected by failing early and quietly I have a need to know specifically why it isn’t logging when it isn’t. I have been looking around for methods to validate a log4net configuration in order to ensure that the file is set up correctly and I couldn’t find any solution apart from me maki... |
| 02/05/2007 12:00 PM | utilize logging functionality in my add-in |
| Replies: 3 |
I've used log4net in several project.It's good.But now, the problem is I want to use log4net for logging in my vs2005add-in, it's a class library assembly.Previously, I use log4net in terms of standlone application such as windowsapplication, asp.net application etc. Now it's an class library.Anyone can tell me how to use log4net in my add-in for logging?Thanks in advance._________________________... |
| 02/02/2007 1:01 AM | Configuration problem (locking files) |
| Replies: 1 |
Hi
I have been given an application consisting of 5 web projects and 5 back end objects into which I would like to introduce log4net. I don’t have a master web.config file (no hierarchy) so I was trying to put the configuration settings into one xml file on the server and introduce code into the global asax to configure each project on Application_Start (.NET 1.1 C#). The pr... |
| 02/01/2007 6:15 PM | Logging stack trace |
| Replies: 6 |
Hello everyone,Is there a way to add a stack trace to each log event for a certainappender layout?I have an errorappender, and when it receives an event to log, I wouldlike it to log the whole stack trace as well.This is for debug and test purposes./marcus |
| 02/01/2007 5:56 PM | AdoNetAppender and reconnect |
| Replies: 4 |
Hi,I have problem with AdoNetAppender. When the DB is restarted or for sometime unavailable, the Appender stops logging for ever.Even when the database is down for some minutes, the appender doesn'trecover after several hours.Is there any possibillity ho to force Appender reconnect withoutrestarting the application (it's ASP.NET)?Thank youMartin Hassmanhttp://www.met.cz/ |
| 01/31/2007 5:03 PM | Logging exceptions using a separate layout |
| Replies: 1 |
Hello,I would like to log events that have an exception so that the exceptionand stack is printed on the nextline, but I do not want to get emptylines between events in the log for all events that have no exception.To achieve this, is there a way to filter parts of a layout? Or specifya layout for events that have exceptions? Or something similar?Help is greatly appreciated!/mawi |
| 01/30/2007 5:24 PM | Log4Net configuration |
| Replies: 1 |
Hi,I am using Log4Net for My website. that is good logging tool. I am usingrollingfile Appender, with info, debug, warn ans fatel level.. but when usethat level the log file have llevels WARN, FATAL, INFO, and DEBUG, I wantsinstead of these words custom words for that.. so anyone tell me about, isit possible of How ?Thanks in Advance,Laxmilal Menaria________________________________________________... |
| 01/20/2007 10:54 PM | What is the best way to attach an ID with each logged message? |
| Replies: 2 |
Hello,I'm looking for a possibility of attaching an ID to each information logged using Log4Net. What will be the best way to use in order to be compatible with with existing viewers (chainsaw, ...).Basically, I want to expose such an overloaded method in my Logger façade:void Info(int id, string msg);and I would like to have this information displayed/available in existing viewer and appenders.Th... |
| 01/19/2007 1:54 AM | Wrapping Log4Net in a Facade --> incorrect LocationInfo shown for file, methods.... |
| Replies: 4 |
Hello,
We are trying the Log4Net in our projects. However, for different reasons, we want to expose it to our developers through a Tracing/Error class facade.
Doing so, we face the following problem:
Whenever an Appender print information about LocationInfo (File, line, Method,....). It will take information related to the caller of the Log4Net method (which is the facade in o... |
| 01/17/2007 11:14 PM | Only the first message gets logged by a DLL |
| Replies: 1 |
Hello,
I have a DLL which gets called from within two applicatons - an application which consists of 3 assemblies deployed in SQL server (log4net and the DLL assembly are referenced and installed in the SQL server)
- an ASP.net application which uses the DLL (the DLL is a project in the Visual Studio solution)
When any of these applications run, the first time we log a message in the DLL, it ... |
| 01/17/2007 10:39 PM | ADONetAppender with Postgres |
| Replies: 0 |
Hi,
I’m building an ASP.NET 1.1 web application using log4net version 1.2.10.0 and Postgres 8.1. I was planning to use ADONetAppender to log the errors to the database but the log4net website does not have Postgres on the list of databases supported for this and I can’t find any information on Google about it.
What I want to know is if it is possible to log the errors to a Post... |
| 01/17/2007 10:15 PM | AdoNetAppender Connection String from App Config |
| Replies: 2 |
Hi All,
I am trying to pull the configuration for the connection string of an ADONetAppender outside of the log4net configuration information. Is there any way that I can update my AdoNetAppender with a new connection string after using the XmlConfigurator to load the configuration?
Since I already have connection strings that need to be populated for Castle, ASP.NET membership... |
| 01/12/2007 8:39 PM | RollingFileAppender almost never rolls |
| Replies: 0 |
I have a c#-assembly that uses a RollingFileAppender for logging. The config file looks something like:<?xml version="1.0" ?><log4net threshold="INFO"><appender name="RollingLogFileAppender" type=" log4net.Appender.RollingFileAppender"><file value="y:\\MyApp\\log\\MyApp_rolling.log" /><appendToFile value="true" /><rollingStyle value="Date" /><datePattern valu... |
| 01/12/2007 5:04 PM | ConsoleAppender doesn't write anything (anymore) |
| Replies: 0 |
Hi all,I'm using log4net 1.2.10 and unable to output anything on the console anymore.The strange thing is that when I debug the application in Visual Studio, I can see output being logged. But when started in a simple dos prompt (cmd) nothing is logged. All other appenders (Ado and FileAppender) are writing output without any problems.Does someone have any clues?regards,Kenneth |
| 01/12/2007 5:10 AM | Log4Net Progress? |
| Replies: 0 |
Is it just me, or has work on Log4Net completely stopped? What's the likely hood of it being ported to version 3 of the framework? |
| 01/12/2007 3:31 AM | Could not find schema information for the element 'log4net' |
| Replies: 1 |
Hi,I am getting the following error upon compile of .Net 2 , Web App in C#:Could not find schema information for the element 'log4net'Every element in the <log4net> web.config file is also returning the sameabove message. I am using log4net 1.2.10 (using the release dll from the 2.0folder, but this was also happening with an older DLL which a colleague hadgiven to me as well)I believe there ... |
| 01/12/2007 3:04 AM | Which patterns are allowed for naming File appenders? |
| Replies: 1 |
It seems that %processid is the only PatternString that works in the name of a File appender. I’ve tried to use %date{} in various ways, but that seems to prevent a log file from being created at all. Is this by design? I’m trying to create a separate log file for each invocation of my application, with the date that the application was started in the file name. Is there a different way to do th... |
| 01/08/2007 8:02 PM | AdoNetAppender problem. |
| Replies: 5 |
Hello. Help me please.I'm using AdoNetAppender. How can I pass NULL value into stored procedure ?Here is my code: ... ThreadContext.Properties["ProcessID"] = DbNull.Value; log.Debug(message);Con... |
| 01/04/2007 4:53 PM | Log4View Version 1.0.9.0 released |
| Replies: 1 |
Dear Log4Net users,
we have just released Version 1.0.9.0 Beta of Log4View, a powerful and comfortable viewer for Log4Net output.
General Features of Log4View:
· Filter by loggers, log levels or any other criteria.
· Search log entries by loggers or message text.
· &nbs... |
| 01/03/2007 1:24 PM | Codeproject.com article/code for Log4NetWebServiceAppender |
| Replies: 0 |
I read the article but haven't looked at the code yet:http://www.codeproject.com/useritems/Log4NetWebServiceAppender.asp |
| 01/03/2007 5:26 AM | RE: Cannot get consoleApp to run on XP |
| Replies: 3 |
Are you sure it's log4net that's causing the issue? I'd post the configfile. Make sure you don't have an extra < or > in the file anywhere. Openthe config file in something that does syntax highlighting. |
| 12/22/2006 2:12 AM | Dynamic SmtpAppender subject |
| Replies: 2 |
Hi,Is it possible to use the log message as subject on the smtp appender?- Morten |
| 12/21/2006 6:31 AM | log4net is truncating log messages with %20.20type{1}.%-30.30method in the ConversionPattern |
| Replies: 1 |
we've encountered a problem where log4net is truncating log messages (samples below). The truncating only happens when we compile in release and the ConversionPattern includes %20.20type{1}.%-30.30method. I'm assuming it has to do with the code optimizations interfering with log4net. What can we do to get the release logging to work correctly? Thanks,Drewenvironment:- version 1.2... |
| 12/16/2006 4:41 AM | Log4net not working as expected |
| Replies: 3 |
Hello,
I have an issue with log4net that I was sure was not an issue before. I have a project which is made up of a few other projects. There’s an exe and 4 other dlls. Logging from the exe works while logging from the dlls does not. Like I say, I know this has worked before. I’ve read thru the documentation and everything looks identical. Does anyone see what I might be doing wrong here or kno... |
| 12/16/2006 1:27 AM | Multiple logs with multiple threads |
| Replies: 1 |
Hello All,I have an application that is doing some generic scheduling and executing ofother objects. Each of these new objects is executed in a separate thread.What I would like to have happen is to be able to dynamically create aFileAppender that is associated to each object so that any logginginformation raised from that object only goes to the associated file. Can anyone give me any ... |
| 12/14/2006 9:54 PM | AdoNetAppender configuration note |
| Replies: 0 |
Hello, All.In case some folks have been wondering why they cannot get theAdoNetAppender to work, along with maybe also using custom parameterfields, I found that the log4net documentation and what works for myprojects is different when interfacing with SQL Server 2005.In the web/app config file in the AdoNetAppender, change the buffersizefrom the documented 100 to 1, like so:<appender name="Ado... |
| 12/13/2006 6:44 AM | Meaningful caller information |
| Replies: 0 |
Hi everyone, I've taken to creating a base class that implements the necessary Log4net interfaces and then derive all my children classes from that. So far it all works well and I've no complaints about the approach. However I've come up against an issue where I would benefit from detailed caller information (to the line # if possible), and the line numbers that are being logged of course r... |
| 12/12/2006 2:28 PM | TraceAppender understanding |
| Replies: 2 |
If I write this in my Config file : <appender name="TraceAppender" type="log4net.Appender.TraceAppender" > <filter type="log4net.Filter.LevelRangeFilter"> <acceptOnMatch value="true" /> </filter> <layout type="log4net.Layout.PatternLayout"> &nb... |
| 12/12/2006 10:46 AM | Need help about RollingLogfileAppender. |
| Replies: 1 |
I have read document about Log4Net and I have some info aboutRollingLogFileAppender : The new file will be created depend on the size ordate in Config file.Is it right ?If it is right, I configured my file Log4Net.Config :<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> <fil... |
| 12/11/2006 4:06 PM | Problem with Log4Net.config file. |
| Replies: 2 |
I create a file : Log4net.config in my project for Log4net configuration (Ido not want to write them in Web.config)But I can not write to log file (for example : C:\\Log_file.txt).(If I config in Web.config, Log_file.txt is updated)Please tell me how I can use external Log4Net.config instead usingWeb.Config.(I am using ASP.Net 2.0)Thanks in advance!--View this message in context: http://www.nabb... |
| 12/07/2006 5:37 AM | Question about rolling appenders... |
| Replies: 0 |
I have a task to reconfigure our RollingFileAppenders so that they roll over every 15 minutes, but looking through the docs, I don't see this granularity of control. Is this something that I'm missing or is it not feasible?
Thanks!
Rory |
| 12/06/2006 4:33 PM | XmlHierarchyConfigurator |
| Replies: 6 |
Hi, All!
I have some private extension for default Hierarchy. And i want to configure it and update it on config-file changes.
I can use basic configuration features, but its insufficient. For example, i want to especially parse some children nodes, as it do XmlHierarchyConfigurator. And, i want no ResetConfiguration required to clear my collection properties and fill ... |
| 12/06/2006 1:24 PM | Question on Date/Time based rolling |
| Replies: 6 |
I need to have date based rolling for log files and want to keep only the 30 log files (corresponding to the last 30 days). Is that possible (with MaxSizeRollBackups or some other way)? If yes, please send me the corresponding xml configuration for the appender. Based on the RollingFileAppender documentation, it says"CAUTION
A maximum number of backup files when rolling on date... |
| 12/06/2006 12:22 AM | Problem mocking log4net appender (Repost) |
| Replies: 2 |
Greetings,Can anyone suggest a workaround to this problem?I attempting to mock a log4net (1.2.10.0) appender with NMock2(1.0.2313.18049). The mock appender throws an ExpectionException whenlog4net calls DoAppend and then log4net eats the exception the testfinishes successfully. UnfortunatelyVerifyAllExpectationsHaveBeenMet() does not cause the test to fail.Apparently the mock appender does not rem... |
| 12/05/2006 9:23 AM | Startup-Shutdown Error? |
| Replies: 5 |
I've git the following code in the main form for a project: [NonSerialized] protected static readonly ILog log = LogManager.GetLogger("errorlog"); public MasterProject() { &... |
| 12/03/2006 3:02 PM | Fwd: Problem mocking log4net appender |
| Replies: 1 |
---------- Forwarded message ----------From: Matt Young <matt.young256@gmail.com>Date: Nov 14, 2006 8:01 PMSubject: Problem mocking log4net appenderTo: nmock-general@lists.sourceforge.netGreetings :)I encountered a problem with NMock2 (1.0.2313.18049) while attemptingto mock a log4net (1.2.10.0) appender. The mock appender throws anExpectionException when log4net calls DoAppend and then log4... |
| 11/24/2006 7:55 PM | log4net Version 1.2.0.30714 : Daily log with infinite persisting backups |
| Replies: 0 |
Hi,
I’ve got the following settings.
These should create 5 backups files every hour. It’s not happening. It’s creating only two (MyLogFile.log and MyLogFile.log.1). But if I change rollingStyle to ‘Size’ and remove the datePattern it’s creating 5 backups.
<appender name="RollingFile" type="log4net.Appender.RollingFileAppender">
&nb... |
| 11/22/2006 7:11 PM | Config asp.net 2.0 problem |
| Replies: 0 |
Hi, Please help ! I have written a wrapper to log4net and the config file is not getting loaded. (in steps) a) Created seperate C# Project "MyCompLog4Net" - Added Ref: log4net - Wrapper class, "MyCompLog.cs" to write log - which internally calls Log.Error, Log.Info, Log.Debug (rest we don't need) - In this project, in the file "AssemblyInfo.cs", tried both settings. ... |
| 11/19/2006 4:47 AM | XMLSocketHubReceiver available |
| Replies: 0 |
Hi folks!I am new to this mailing list and I hope that I am right here.I finished a XMLSocketHubReceiver and all I wanted to do here is to ask the developer to add thisreceiver to the log4j package. I am not here to drop my footprint and most likely this will be the oneand only thing I will have done regarding to log4j because I am not a professionell Java developer.I developed the XMLSocketHubRec... |
| 11/19/2006 2:36 AM | RollingSqlAppender |
| Replies: 0 |
FYI, Ayende blogged about a RollingSqlAppender he wrote:http://www.ayende.com/Blog/IntroducingRollingSqlAppender.aspxIts a combination RollingFileAppender and AdoNetAppender. I haven't tried it out or looked at the source code yet. |
| 11/16/2006 9:58 PM | Facade layer / Wrapper ... log4net |
| Replies: 0 |
Hi, I am trying to write a Facade Layer to wrap the log4net to achieve the following: [ We are using asp.net 2.0] a. To log more information b. To include some of the goodies that MS EntLib 2.0 provides c. To enforce size limits d. To log additional info depending on the level e. To write some context info. f. Mainly, we have multiple projects and we want developer to know less about... |
| 11/14/2006 3:28 PM | Detached definition of layout |
| Replies: 6 |
Hello, my log4net config gets to be a bit complicated. I have lot ofappenders, which of them defines the same layout: <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%date [%thread] %-5level %-35.35logger[%-10.10property{NDC}] - %message%newline" /> </layout&g... |
| 11/14/2006 6:58 AM | Programmatically change logfile name |
| Replies: 2 |
Hi.How can i set the name of the logfile in an application ?Get FileAppender by name and change File property ? How ? (mk) |
| 11/14/2006 6:50 AM | RollingFileAppender & concurrency |
| Replies: 6 |
Hello,
We have a .Net v2 asp.net webservice that uses log4net. Our customers want to run our product in a webgarden (multiple processes running on the same machine). Each process, uses the same web.config, and thus the same RollingFileAppender file name.
Will the service interleave the log calls to the single file correct? (a simple test I did with a console app, running... |
| 11/13/2006 10:04 PM | Public Key Changed!?!?! |
| Replies: 2 |
OK, I have a serious problem with the log4net 1.2.10.0. I am required to usethis version because nhibernate links to (as of NH 1.2.0 Beta 2).Why has the public key changed? I am referencing a variety of assemblieswhich link to older versions of log4net - no problem right, I just use abindingRedirect in the app.config file.Well, the bindingRedirect no longer works since the public key has c... |
| 11/13/2006 4:50 PM | Bug with ADONetAppender + MS Access on .NET 2.0 |
| Replies: 1 |
Hi all,When trying to log into an access db using the AdoNetAdapter with anOleDb connection i get the following error in a VS 2005 (.NET 2.0)project (see bellow). I am logging from log4net sample app ConsoleApp,config file is attached.I have found exactly same question in mailing list archive (06/10/200611:44 AM Subject: Trouble using AdoNetAdapter with .net 2.0 project),but without any work... |
| 11/12/2006 8:35 PM | Repository |
| Replies: 0 |
Hi!I doesn't get the log4net Repository working. Given two minimal C#projects one console exe LoggTest.Main.exe and a libraryLoggTest.Library.dll both having its own App.config file. Bothrepositories is configured to log in different logfiles. I tried anumber of combinations as removing the Repository attribute in theconsole exe. I also get the following error:log4net:ERROR [FileAppender] Unable t... |
| 11/09/2006 1:32 PM | Need for LOG4NET Audit |
| Replies: 1 |
Dear Sir / Madam,
We have problem in log4net audit. I have search on Google and your website but I did not get any good example and document that can help me.
So please kindly send me related example and document as soon as possible.
Regards
Rajani Rawat |
| 11/09/2006 7:17 AM | IObjectRenderer.RenderObject(); what to do with textWriter? |
| Replies: 0 |
I have an implementation of IObjectRenderer that formulates XML for allSystem.Exception objects. I have validated that I have configured therenderer correctly, and my renderer is being loaded at runtime. I havea custom layout and appender that are all working as expected. This isthe only component that doesn't seem to be working.I don't think I'm clear on what to do with the text... |
| 11/08/2006 5:28 AM | NullReferenceException in AppenderSkeleton.get_Name() |
| Replies: 2 |
I had an ASP.NET 1.1 application crash recently. There was anunhandled exception in AppenderSkeleton.get_Name(). I don't think thisis the cause of the application failure but I am hoping it might helpme determine the root cause of the problem.What could cause this exception in this method?System.NullReferenceException: Object reference not set to an instanceof an object. at log4net.App... |
| 11/07/2006 2:30 PM | Audit in LOG4NET |
| Replies: 1 |
Hi,
Could u please tell me how to implement LOG4NET Auditing.
Regards,
Rajani Rawat |
| 11/07/2006 9:29 AM | Possible To Name Log File After Assembly? |
| Replies: 1 |
Dear Community,I was wondering if it is possible to name a log file after an assemblyvia the config file. Here is my config file:--<?xml version="1.0" encoding="utf-8"?><configuration> <configSections> <section name="log4net"type="System.Configuration.... |
| 11/06/2006 3:32 PM | Logging from COM+ |
| Replies: 8 |
Hi,I have a classic asp application which is havingseveral COM+ components.I want to use Log4Net forlogging from this application,is it possible.IsLog4Net supports logging from com+.kindly let me knowas the requirement is urgent.Thank youAshish__________________________________________________________________________________________Sponsored LinkTalk more and pay less. Vonage can save you up to $3... |
| 11/03/2006 3:50 PM | How to implement log4net |
| Replies: 2 |
Hi,
I need auditing (log4net) material.
Regards,
Rajani Rawat
|
| 11/03/2006 2:44 AM | compiling log4net on os x using mono framework |
| Replies: 0 |
Hi - does anyone here have experience with compiling log4net on os x using
the mono framework?
From the documentation it seems possible, though perhaps not trivial.
Thanks in advance for any pointers.
|
| 10/31/2006 9:29 PM | Using different log files for different assemblies |
| Replies: 1 |
Hi,I'm using log4net-1.2.10 with .NET 2.0 to develop a Windows (Forms) application.I have added two file appenders (one for Debug & above; the other forInfo & above). The settings for these are specified in my app.configfile.Everything was working fine, until I needed to add a reference toanother assembly (dll) developed by a colleague. This assembly alsouses log4net for logging, the setti... |
| 10/31/2006 3:11 PM | RollingFileAppender Problem |
| Replies: 0 |
Hi there!
I'm using the following configurations:
+ Win2k SP-4, WinXP SP-2
+ C# .Net 2.0
+ Log4Net.dll 1.2.9.0
The Logger is running for a Win-Service and configured as shown in the xml-snippet of the attachement.
What I want to achive is, that I will get one log-file for each day rolling after 30 days,
so I set the following keys:
<rollingSty... |
| 10/28/2006 8:15 AM | Log4net and ASP (vbscript,COM) |
| Replies: 0 |
Hello,
I'm trying to use log4net in order to log ASP web application (vbsript).
I don't know how to set up it, but I find post in forum http://www.nabble.com/COM-and-VisualBasic-6.0-and-log4net-tf273514.html#a769573
It also didn't work.
Is it possible to log ASP application with log4net, if yes how to set up it.
Thank you very much
Michael |
| 10/17/2006 4:49 PM | what's wrong with my application? |
| Replies: 2 |
I wrote a very simple c# application to try writing to log file, and it doesn’t work. The log stays empty.
Can someone please tell me why?
The application code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using log4net;
using log4net.Appender;
 ... |
| 10/17/2006 2:41 AM | ListView Appender |
| Replies: 2 |
Hello all!I am trying to find out if anyone has written an appender for a ListView orif there is some reason that I shouldn't do so. I currently have anappender for a RichTextBox that I found on the net, so it seemed a fairlylogical progression to go with a ListView. But I didn't know someone haddone this already and found some major pitfall that I hadn't encounteredyet.Thanks,Lee Keel... |
| 10/12/2006 2:29 AM | AllowPartiallyTrustedCallers Attribute |
| Replies: 1 |
HiI have a problem running a web site medium trust with log4net when it is not in the GAC - according to the MS security docs this should be solvable if the AllowPartiallyTrustedCallers attribute is added to the assembly.Any reason for not doing so?Also, how do I tell the nant build to strongly-name an assembly - I've generated my key, but the assembly is still unsigned.RegardsPaul |
| 10/11/2006 1:19 PM | Application Config File |
| Replies: 1 |
Hey,I am using VS.NET 2003 Framework 1.1 with Managed C++ and had some problems with the application configuration file which I wanted to use to configure log4net. The build process never created the <applicationname>.exe.config file from the app.config.As I learned from http://www.codeguru.com/cpp/cpp/cpp_managed/asp/article.php/c4873/this is only automatically done for VB and C# so I added... |
| 10/10/2006 8:55 PM | Release mode compilation of WinService kills debug messages |
| Replies: 1 |
Hi all,I have a somewhat strange problem with Windows service application. The problemis: when I’ve compiled the VS Windows Service project in Release mode all debugmessages with DEBUG level have stopped to output in a log file. I’ve just testthat with normal Windows Forms app and it works fine in Release mode (I can seeall messages of level DEBUG in a log file). Anybody knows what’s going on?Than... |
| 10/05/2006 7:55 PM | Logging is delayed |
| Replies: 0 |
I am new to log4net and setting up log4net, and am experiencing some problemswhen logging to a SQL Server 2005 DB.I have created a button with the following event to test:protected void Button1_Click(object sender, EventArgs e){log4net.Config.XmlConfigurator.Configure();log.Info("Hi..Test Log Message at "+DateTime.Now.ToString());}When I press the button for the first time, nothing happens in th... |
| 10/02/2006 10:19 PM | AdoNetAppender using OdbcConnection Class |
| Replies: 0 |
I am currently using v1.2.9.0 in a dll to write to a SQL database from aconfig file on the 2.0 .NET Framework.I have successfully set up my config file to write directly to SQL withSystem.Data.SqlClient.SqlConnection. I need to be able to support multipledatabase types, so I am using and ODBC connection to my database. I amhaving problems configuring the commandText node to match the parameterspro... |
| 09/29/2006 7:50 AM | race condition using RollingFileAppender with multiple processes? |
| Replies: 2 |
Hi.I apologize in advance if I have missed the answer to this question in my searches on the log4net website and the internet in general. I am using log4net 1.2.9 to generate logs on an ASP.NET web client application. This app is running on IIS with 20 processes. I am seeing what I believe is a race condition when the logs roll over at the hour mark. I can see the new log a... |
| 09/29/2006 3:30 AM | Retrieving log4net error conditions |
| Replies: 1 |
Hello list, I am wondering if there is a way to recieve an error messages from log4net 1.2.10 if it is unable to write to a log file. Reading through the release faq ( http://logging.apache.org/log4net/release/faq.html) I see that exceptions should not be thrown, however is there some method I can call to see what the last error(if any) log4net encountered when writing to the log... |
| 09/27/2006 5:45 AM | Log user on thread |
| Replies: 0 |
How can I have the current user fromSystem.Threading.Thread.CurrentPrincipal.Identity.Name automatically writtento my log file?--View this message in context: http://www.nabble.com/Log-user-on-thread-tf2341410.html#a6516582Sent from the Log4net - Users mailing list archive at Nabble.com. |
| 09/27/2006 2:28 AM | Turn off logging for a specific event only |
| Replies: 7 |
Is it possible to turn off the logging for a specific event? I would like to turn of the logging when the code hits a particular method and reset the logging to its original value which is "DEBUG" while exiting that method. Is it possible to accomplish this? If so, please provide me some sample code on how to achieve this. My code is in c#.net and uses log4net version 1.2.10
Ple... |
| 09/26/2006 10:21 PM | AdoNetAppender Multiple Columns |
| Replies: 1 |
I am wanting to log the date, a message as well as the username to thedatabase with log4net. However, it appears that the only value that I canexplicitly indicate to log for log4net is the message. I do not want to haveto place the username as well as other information all within the messagestring. How could I set up log4net to log to the database and have th... |
| 09/21/2006 8:02 PM | Are there ConfigureAndWatch events? |
| Replies: 0 |
Hi there,My applications configure and watch a configuration file and alsoprogrammatically add another appender to display log messages within thegui.Is there an event available for when the watched file is reloaded sothat I can programmatically add the gui appender again?Thanks,Duncan |
| 09/20/2006 10:43 PM | Filtering messages by thread |
| Replies: 0 |
I'm trying to get filtering working so that a given appender only accepts messages from a given thread.
I'm creating the appenders at runtime based on an external event. I would like that appender to then only accept messages from the thread it was created on.
Is this possible without creating my own Filter? I'm thinking I could use a PropertyFilter... |
| 09/18/2006 8:54 PM | RollingFileAppender. |
| Replies: 0 |
Does anybody know if I can call the flush() method on a RollingFileAppender? If not, is there anything similar to the flush() method that I can use in rolling file appender?
Thanks
|
| 09/16/2006 4:20 AM | ConfigureAndWatch Performance Impact |
| Replies: 1 |
Does anyone have any information regarding the performance impact ofusing the ConfigureAndWatch to monitor possible changes to the configfile?Thank you,Susan |
| 09/15/2006 9:57 PM | Different Log Level per Logger per Appender? |
| Replies: 0 |
I am curious if log4net supports the concept of having the same appenderassociated with more than one Logger, but at different levels for eachLogger.Example:Lets say I have Logger L1, and Logger L2Lets say I have RollingFileAppender A1, and ConsoleAppender A2Is it possible to configure log4net such thatL1 and L2 both send debug or greater to A2L1 sends error or greater to A1L2 sends fatal or great... |
| 09/15/2006 9:52 PM | log4net 1.2.10 overwriting instead of rolling over |
| Replies: 4 |
I just upgraded to log4net 1.2.10 from 1.2.9 (to fix that exceptionmessage I wrote about last week). And I'm having a big problem withthe log files not rolling over at maximumFileSize and instead justoverwriting itself!I have this running on a asp.net app on 2 different web servers(win2003/iis6). I had both files open with Tail for windows and thiswas not a problem in 1.2.9, the files would proper... |
| 09/14/2006 10:10 AM | Programmatic configuration |
| Replies: 5 |
Hi,I am using log4net in a C# console application. The requirementsspecify that I retrieve the error log file and debug log file from theregistry. Once I have done that I then need to configure my applicationto log to those files (for all classes).How do I do this? I can't find a configuration example for programmaticconfiguration, but it is mentioned in the documentation and exa... |
| 09/14/2006 1:07 AM | getting the latest version of log4net 1.2.10 |
| Replies: 4 |
Hello,
I currently have 1.2.9 version and want to upgrade to 1.2.10 but I don't see any steps regarding the upgrade on the website. Here is the list of questions that I have
Should I uninstall the older version first? If so, how do I uninstall it?
Or, can I replace the existing version 1.2.9 with the newer 1.2.10 version?
Can I have both versions on the same machine but in... |
| 09/13/2006 11:15 PM | Using Log4Net with Oracle |
| Replies: 2 |
As our application is distributed, I am trying to log messages to ourOracle database. In the app.config, I have the following:<appender name="AdoNetAppender" type="log4net.Appender.AdoNetAppender" <bufferSize value="1" /> <connectionTypevalue="Oracle.DataAccess.Client.OracleConnection, Oracle.DataAccess... |
| 09/13/2006 7:50 PM | Accessing all appenders / layouts |
| Replies: 2 |
Hello,Is there any way to access all appenders and layouts in theconfiguration file (even those that are not associated to anylogger?).I'm using log4net 1.2.10.Thank you.Best Regards,--Gonçalo Luiz |
| 09/12/2006 5:23 AM | logging (or not) specific classes, through the config |
| Replies: 3 |
Is there a way to log (or not) specific classes even though they have a logger configured?
I want the appenders that I use to be at the debug level but I am not interested in messages from this particular class.
There should be a way to do this from the App Config file, but I have not found it…
|
| 09/12/2006 1:08 AM | Runtime configurations |
| Replies: 2 |
Hello,I'd like to configure my logging infrastructure without touching the.xml that will only be the "default" values for the system.For instance I'd like to change the log level of a given Logger, or toadd/remove appenders to a given Logger.Also, I'd like to change layouts and appenders configurations in runtime too.I think I can manage Layouts and Appenders, since they expose publicproperties th... |
| 09/07/2006 11:03 PM | Windows Service console output |
| Replies: 4 |
Log4net 114322Platform .Net framework 1.1 VS 2003I have a windows service and I am logging events to a file and a consoleappender. Log4net is watching the app config file. (using an attribute)The File appenders work fine but I get no events in the output window.(The console appender works fine when I debug an application. If I runmy service like an exe (by creating a new instance of the service an... |
| 09/05/2006 9:43 PM | Uncaught exception: System.IndexOutOfRangeException |
| Replies: 4 |
I'm using log4net 1.2.9 and got these uncaught exceptions thrown frommy application causing it to crash this past weekend:System.IndexOutOfRangeException: Probable I/O race condition detectedwhile copying memory.I am using log4net with an asp.net 1.1 web service, and am writingentries to the log for every request. This is on a windows 2003server, using iis6, and web gardening is turned on, so mult... |
| 09/01/2006 4:19 PM | Appender stops if network error |
| Replies: 1 |
HiIs there a way of handling a situation with a RollingFileAppender thatstops logging if there is a network error.I had a situation where the application was logging to a network diskand at some time the network was bad.The logging is reinitialized at midnight, but I wounder if there existsany Exception handling that could make the appender get reinitialized atonce if an error occurs./Richard-----... |
| 09/01/2006 3:41 PM | Using log4net with web services |
| Replies: 2 |
HiI would like to use log4net to log from a web service (asmx file).I am quite new to web services and .NET but I've uses log4j for longyears before.Could anyone give me some advice about how integrate log4net with webservices ? Where/how to initialize it ? Where/how to configure it?Is there something specific to web services, i.e its stateless behavior?Best regardsAdriano Labate |
| 09/01/2006 4:58 AM | How to pass data to custom ADONetAppender parameters? |
| Replies: 6 |
Hello,I am trying to find a way to have my own custom parameters that I would logto a SQL Server Database. I am a newbie to this, so I got the"out-of-the-box" implementation of logging exception, message, dates to SQLServer, however, I want to pass my own variables the database. So, mytable would fields would have something like:Table name = CustonStuffLog Fields:MyCustomMessag... |
| 08/28/2006 6:03 PM | Duplicate entry more info |
| Replies: 0 |
Dear all,I am sorry to post it once more. My old problem with duplicate entries isstill not solved.But I had to shift the debugging because of some urgentwork.I am attaching the full init code now. It is called only 1 time.But internal debug shows that the log file is opened 2 times. I have noidea, what the reason could be.I thank you for any help for any help. &... |
| 08/17/2006 10:23 AM | simulating tail -f |
| Replies: 2 |
Greetings,I am writing the logs to log files using File appenders (2 different logs, one for info and one for debug).Is it possible to access these logs and show them within my application's Interface upon clicking a "view current logs" button?Basically I would like to simulate "tail -f" from within the application.ThanksSaurabh |
| 08/17/2006 12:13 AM | FW: Problem logging in class library |
| Replies: 5 |
Hi Everyone
I am new to log4net and I am facing problems with it. In my .Net solution I have a class library project and a ASP.net project. I want to create a Logger class which is like a wrapper in the class library and have all the other Webservices or ASP.net projects in the solution access that.
This is how I use log4net in the Class library
AssemblyInfo.cs
[assembly : log4net.Co... |
| 08/10/2006 5:40 AM | Unrecognized configuration section log4net? |
| Replies: 1 |
I'm writing a Windows service using .NET 2.0In my app.config, I have a <log4net> section that sets all log4net settings.My app launches, and starts to run perfectly. All logging worksperfectly and is properly configured.Then when my code hits:FtpWebRequest.Create(uri)I get an exception with this messager: "Unrecognized configurationsection log4net"Obviously, log4net, isn't part of the offici... |
| 08/10/2006 12:12 AM | Why ThreadId and not Hash Code? |
| Replies: 2 |
From the .NET SDK:
GetHashCode provides identification for managed threads. For the lifetime of your thread, it will not collide with the value from any other thread, regardless of the application domain from which you obtain the value.
Note An operating-system ThreadId has no fixed relationship to a managed thread, because an unmanaged host can control the relations... |
| 08/08/2006 4:38 PM | Log4Net patches... |
| Replies: 2 |
Hello,I'm just following the instructions at the bottom of this page -(http://logging.apache.org/log4net/contributing.html#svn-anon) which says:> however it may also be worth mailing the log4net-dev list to encourage the> project committers to apply your patch, or at least find out when they may> do so.So that is exactly what I'm doing! ;) I'm the lead on Subtext(http://subtextproje... |
| 08/05/2006 5:39 AM | XmlConfiguratorAttribute and absolute path? |
| Replies: 0 |
I have an assembly which is a plugin that gets loaded by a hostapplication. Its application base directory as returned byAppDomain.CurrentDomain.BaseDirectory is nowhere near where I must putmy assembly. Here's what I am trying to do. Have my <myaseembly.dll>.log4net located in the same folder as my assembly.It doesn't seem to be that there is a way to specify an absolute p... |
| 08/04/2006 8:32 PM | Best way for inserting additional message in log? |
| Replies: 2 |
HiWhat I'm trying to do is to include new field (column) in Sql DB, with some additional business related information.I need this optional info (parameter) in NEW column for fastest browsing and searching.Idea is to call log from application with new parameter: log.Info("My message","Some business data");// or log.Info("My message", ex, "Some business data"); // with ExceptionI'm already using cus... |
| 08/03/2006 9:27 PM | configurable file purging and logging to two files |
| Replies: 1 |
1) Is there a configuration option for having files, say older than 14 days, purged from the hard drive?
2) I am logging particular events to a separate file and have that working. The problem arises from the fact that these events are logged both to my main log file and also to the separate file. What in my configuration needs some tweaking?
<log4net> <... |
| 08/03/2006 9:14 PM | Why is LogManager not inheritable? |
| Replies: 2 |
I implemented a custom LogManger to allow a couple additional levels. My concern going forward is that I will constantly have to determine what new code is not present in my LogManager vs. the standard Log4Net LogManager.
Insight?
Thanks,
Rich
|
| 08/03/2006 5:45 AM | Default logging when config not present? |
| Replies: 2 |
I thought at one point I had read somewhere, perhaps in the Log4J docs, that when the logging file was not present, it would use a default logging configuration going to the standard output or console.
I have a command line program and when the app.config file for it is not present, I don't see any console logging.
Advice?
Thanks,
Rich
|
| 08/03/2006 5:43 AM | Calling appenders not threaded? |
| Replies: 1 |
Am I correct that appenders are not called (doAppend) as individual threads? If so, why not?
Thanks,
Rich |
| 07/28/2006 5:18 AM | Logging Level between Info and Debug? |
| Replies: 2 |
Hi, I need a logging level that is between Info and Debug. For example, I have a process that runs and I need to log the details of the process using Info (ex. What records were updated for Sarbanes Oxley requirements). However, I also need to log summary information such as how many records were updated, how many of a particular action were taken during ... |
| 07/27/2006 1:28 AM | log file for each session |
| Replies: 3 |
I am learning log4net and want to know how can I config it to create log filefor each web session. say the log file name would be log{sessionid}.logCan someone give some example?ThanksVictor--View this message in context: http://www.nabble.com/log-file-for-each-session-tf2005101.html#a5507552Sent from the Log4net - Users forum at Nabble.com. |
| 07/26/2006 5:42 PM | One log per assembly |
| Replies: 0 |
Hi,I have 2 problems :- First, I don't know how can have one file per assembly. All my logs are mixed in the first log file called. (same call pocess perhaps) Is it possible to do that?- Then, I call an assembly from Vb6 application. I want to log form my assembly but it doesn't work. (It works well when I call it from a .Net application). Have you got an idea?Thanks a lotVincent |
| 07/26/2006 5:21 PM | mono and coloredconsoleappender |
| Replies: 3 |
Hi,I am trying to compile my projects into mono and I have one small problem.error CS0234: The type or namespace name `ColoredConsoleAppender' doesnot exist in the namespace `log4net.Appender'. Are you missing anassembly reference?Compilation failed: 1 error(s), 0 warningsIf I switch to ConsoleAppender there is no errors.I am using the mono-2.0 dll in the log4net package.- Morten |
| 07/25/2006 11:27 AM | AppenderSkeleton onClose - interop object not accessible |
| Replies: 0 |
Hi,
I am implementing Lotus Notes mail and Notes Log appenders using AppenderSkeleton with .Net 2.0
The appender loads fine, the append method is functioning, but when onClose is called, my reference to the Lotus Domino com object (interop) is invalid with all properties of the object I am referencing showing the following error:
COM object that has been separated f... |
| 07/25/2006 4:11 AM | Logging comments |
| Replies: 0 |
I thought of a really cool idea a long time ago, and I wanted to see ifanyone has thought of it, or even implemented it.The problem: In code, you often write comments, and you often write logmessages. You may or may not write them about the same thing. In somecases, you might even have a comment, and then a message that logs it.The solution: What if you had a script that would parse th... |
| 07/25/2006 1:52 AM | Log4net log machine name adonetappender: |
| Replies: 1 |
Hi
I am trying to log machine name via log4net adonet appender. I want to access the machine name via the log4net pattern layout. Is there any property defined and accessible for logging machine name by adding it as an additional parameter to the AdoNetAppender like... "%p{machine}".
Thanks, Kumar |
| 07/23/2006 9:12 PM | Performance #'s for Log4Net and some ideas about how they can be improved |
| Replies: 2 |
I've written some small sample code because I wanted to see how bad theperformance hit was between if (log.IsDebugEnabled) log.Debug(Message);and&nb... |
| 07/23/2006 7:49 PM | Log4net bug when using ThreadContext |
| Replies: 3 |
The following code is failing, even though it looks like it can work:
MemoryAppender appender = new MemoryAppender();
ILog logger = LogManager.GetLogger("foo");
BasicConfigurator.Configure(appender);
using (log4net.ThreadContext.Stacks["1"].Push(null))
{
logger.Error("Should work");
}
Debug.Assert(appender.GetEvents().Length != 0); |
| 07/18/2006 7:28 PM | Error: Unable to find the specified file (RollingLogFileAppender) |
| Replies: 3 |
Hi,
After a long time processing, the log4net fail on writing the log file.
Here it is the error:
Exception InformationSystem.IO.FileNotFoundException: Unable to find the specified file. at System.IO.__Error.WinIOError(Int32 errorCode, String str) at System.IO.__Error.WinIOError() at System.IO.FileInfo.MoveTo (String destFileName) at log4n... |
| 07/18/2006 7:20 AM | RollingFileAppender Problem |
| Replies: 0 |
Folks, I am having a problem in Rolling file appender, I want to generate the log file on daily basis and want the file name should be appended with the current date, plz plz help me out to do that, I have tried alot and searched alot, but nothing happened, plz need experts guidence. below is my config file which I am trying to generate ... |
| 07/14/2006 9:29 PM | Appenders and AppDomains |
| Replies: 5 |
HiIs it possible to have one appender for all app domains in a process?Each app domain has its own appender, but I also want a global appenderfor all domains.- Morten |
| 07/12/2006 12:51 AM | Why each message printed 2 times? |
| Replies: 6 |
Dear all,With minimal lock each message is printed into a log file 2 times.i.e.[11 Jul 2006 18:43:10,663] DEBUG Log1 - pi is nothing[11 Jul 2006 18:43:10,663] DEBUG Log1 - pi is nothingWith exclusive lock works as expected.Any ideas why?m_LockingModel = new FileAppender.MinimalLock();m_FileAppender = new FileAppender();m_FileAppender.Layout = new log4net.Layout.PatternLayout("[%date{dd... |
| 07/10/2006 10:49 PM | Filter chaining |
| Replies: 1 |
------------------------------------------------------------------------------------------------
....
<appender name="appenderName"
type="log4net.Appender.FileAppender">
<param name="File" value="log-data\\my.log" />
<param name="AppendToFile" value="true" />
<layout type="log4net.Layout.PatternLayout">
&l... |
| 07/08/2006 12:08 AM | dispatching log to multiple file based on class |
| Replies: 1 |
I retry to submit my question:I need to create or configure existing log4net library so that I'll be ableto have a log file for each class I decide to log.So briefly: one log-file for each class. Is it possible with log4net ?If yes how?For example suppose I have 2 classes:class C1 { protected static readonly ILog log = LogManager.GetLogger(typeof(C1 )); ..... |
| 07/07/2006 3:34 AM | Whitespace in Messages? |
| Replies: 2 |
Hi,I am trying to print some log messages containing spaces to a RollingLogFileAppender, and the white space is getting compacted. Basically, I'm logging a string by doing something like this in C#:string str = String.Format("{0,-20} {1, -10}", string1, string2);The log output has only one space between the two strings, rather than being padded out to 20 spaces as I was expecting. (I'm trying to p... |
| 07/06/2006 6:04 PM | One log file per class. Is it a possible behaviour? |
| Replies: 0 |
I need to create and manage a log system thathas one file for each class logged, with the possibilityto have the following log-file-name pattern:<full-namespace-class-name>.<yyyymmdd>.logFor example suppose I have 2 classes:class C1 { protected static readonly ILog log = LogManager.GetLogger(typeof(C1 )); ... log.Debug(".... this wr... |
| 07/04/2006 9:50 PM | How to make assembly directive in ASP.NET site. |
| Replies: 1 |
Where can I put [assembly: log4net.Config.XmlConfigurator(Watch = true)]in an ASP.NET webpage? Ideally I'd like to specify this in some placelike the Global.asax so that all my sites will be configured. There isa <%Assembly %> directive but it only has the attributes src and name soI'm not sure how to declare it. |
| 07/03/2006 9:46 AM | Switch-on the logger by the namspace |
| Replies: 0 |
My sample project is configured like this: namespace Com; namespace Com.Foo; namespace Com.Foo.Folder; namespace Com.Other; namespace Com.Other.Folder; when i switch the Com in the config file to "Level=OFF". Then should be all Logs off. when i switsch the Com, Com.Foo, Com.Foo.Folder to "Level=DEBUG" then the log of this namespaces schould be logged. Now when i switch the Com.Foo to ... |
| 07/01/2006 8:41 AM | XML configuration file - extracting elements |
| Replies: 2 |
Is there a way to extract elements from log4net’s XML configuration file, without reopening the file and parsing it?
For example, I’d like to get a certain appender’s “file” property, so that I can create the logging directory every time logging is done. I need to do this to support runtime changes in the directory specification in config xml. Since the log4net assembly is designed to w... |
| 06/29/2006 10:27 PM | Config not honoring appender |
| Replies: 5 |
Here is my config. For some reason foo.bar writes to appender A1. Whathave I done wrong?<log4net> <!-- A1 is set to be a ConsoleAppender --> <appender name="FileAppender"  ... |
| 06/29/2006 2:50 PM | ASP .NET 2.0 Security error - Config problems - Any ideas? |
| Replies: 6 |
Hi there
I'm using log4net with an ASP .NET 2.0 application. On my local machine all works well, but when deployed to an ISP, there are no logs.
After much debugging, I discovered that log4net was failing on a "Security Error" (see error message below) – i.e., the server's trust level is Medium and blocks log4net from reading the config data. (When I used a separate log4net.con... |
| 06/29/2006 8:44 AM | log4net logging not working |
| Replies: 2 |
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();
&nbs... |
| 06/26/2006 10:22 PM | Format of the NDC |
| Replies: 3 |
I was delighted by the NDC feature of log4net/log4j as my own tracing framework had the same feature. Its only when I wished to add things like the Smtp and Ado appenders that I choose to switch to ready made library.
My question is, how do you format your NDC messages to be easily readable? It seems that by default, different levels of the context stack are not distinguished and allowed ... |
| 06/26/2006 10:16 PM | When to log, when to throw - Help! |
| Replies: 12 |
Hi all,
I don't think I have grasped something basic about using error handling as I am having trouble integrating exceptions with logging. The goal of my logging is at high levels to be comprehensible to a non software engineer and provide sufficient information to fix any problem that has occurred. Exceptions are the default error handling of .Net and almost every object can throw ... |
| 06/23/2006 8:06 AM | Ideas for Log4net presentation |
| Replies: 3 |
Does anyone have topics they would enjoy seeing in a log4netpresentation (spoken presentation with slides and code walk-though)?Some ideas:- What do you find confusing about log4net?- What things were hard to figure out when you first started usinglog4net?- What things are still hard to figure out when using log4net?etc.Does anyone have slides about log4net that are available on-line?Thanks,Ron |
| 06/22/2006 8:09 AM | Log4net Stops Logging |
| Replies: 1 |
We have log4net using SQL Server as Appender for logging. We ran load tests using LoadRunner that logs using log4net through Business objects. Two tests were done. Results were these….
In the first test logging stopped after 11 hours into the test though the test continued for 24 hours.
In the second test, we raised the size of the Logging database to 5 GB to remove... |
| 06/22/2006 2:37 AM | ReconnectOnError Syntax |
| Replies: 1 |
Log4net Users:
Can anyone clarify the exact syntax for the Appender for the attribute “Reconnectonerror”. The two syntaxes that I see are …
1.
<param name="reconnectonerror" value="true" />
2.
<reconnectonerror value="true" />
Thanks
Rama K.
|
| 06/22/2006 1:03 AM | RollingFileAppender file name |
| Replies: 4 |
Is it possible to use "Conversion Pattern" in the file name of theRollingFileAppender? For example, I want the logfile name like:hostname.appname.log. So if the same application runs at differentmachine, it will have different logfile.How can I setup this in config file?I tried following:<param name="File" value="C:\\Logfiles\\%property{log4net:HostName}.Test.log" />It didn't work. Internal ... |
| 06/21/2006 11:44 PM | Prevent logging messages that contain a string |
| Replies: 1 |
I see that the StringMatchFilter logs messages that match StringToMatch or RegexToMatch properties, but is there a way to NOT log messages that match? Something like a DenyStringMatchFilter, perhaps?
The rule would be something like this: Log all messages _except_ those that match the filter.
|
| 06/21/2006 11:33 PM | Disable |
| Replies: 2 |
Other than renaming my XML configuration file is there a good line todisable all logging ? |
| 06/21/2006 11:28 PM | Customize the exception output |
| Replies: 4 |
Hi,
I've had a request from the developers at my company to modify the way in which log4net outputs exceptions to the log. This would need to take effect in my EventLogAppender and AdoNetAppender. Will I need to create my own custom class similar to ExceptionLayout or a custom class similar to ExceptionPatternConverter? How can I specify this change to the EventLogAppe... |
| 06/21/2006 7:31 PM | maxSizeRollBackups property of Rolling File Appender |
| Replies: 1 |
I am using Rolling File Appender provided by ““log4net-1.2.9-beta” version, for writing the logged messages into a local file.I found that <maxSizeRollBackups> is supported only when "RollingStyle" property is set to "Size". If "RollingStyle" property is set to “RollingMode.Date” the property “maxSizeRollBackups” does not work.My Requirement is to Limit the number of back up copies whatever ... |
| 06/20/2006 11:08 PM | different application read some config file |
| Replies: 4 |
I have couple programs that run on different servers. Each program uses thesame AdoNetAppender. Right now I have to have the AdoNetAppender config foreach program, though the AdoNetAppender config is exactly same for eachprogram.Is it possible to just put one copy of AdoNetAppender config in a centralplace and each program goes there to get the config? If it's possible, I canjust put the config in... |
| 06/20/2006 5:08 PM | Where to load configuration |
| Replies: 2 |
Hi people :-)I have a site that creates an object that retreives data. I have aservice that runs that goes and gets data from various sources and putsthem into files that this data retriever object then accesses. i.e. theservice and the retriever are in no way related. However they are allpart of my solution in Visual Studio 2005. As is my website.I'm a bit unsure where to put my... |
| 06/17/2006 5:18 AM | Log4Net machine based configuration |
| Replies: 2 |
Hi,I am wondering if any thought has been given to coding log4net in such a way that the configuration settings can be on a per-machine basis within a single .config file? Internally, my company has created a framework that localizes all application settings so that the production, staging, integration and developer workstations are all running different settings. The settings are all ... |
| 06/15/2006 11:29 PM | Are there any open source viewers? |
| Replies: 3 |
Are there any open source viewers that will work with either thelog4net.Layout.XmlLayout or XmlLayoutSchemaLog4j? |
| 06/15/2006 8:53 AM | FeedAppender |
| Replies: 0 |
Anton Fajardo offered to write an RSS Appender almost a year ago.Other than that I cannot find mention of such development.Before I get started coding it - yes I believe it would be useful - Ithought I would verify this does not duplicate another effort.--Rjae Eastonblog: http://applanet.com/percs/wiki: http://applanet.com/wiki/ |
| 06/14/2006 12:13 AM | new public key for 1.2.10? |
| Replies: 4 |
According to discussion at http://forum.springframework.net/showthread.php?t=470, the public key has changed from version 1.2.9 to 1.2.10.Was this by design? |
| 06/12/2006 9:53 PM | Problems with separate logfiles at multiple layers of DLLs |
| Replies: 0 |
I've got a problem with my relatively complex service-based application.Here is the structure and desired logging results of the entire application:1. A service watches serial port traffic, builds message responses, andchanges data in a DLL.The service should maintain its own [shared] log4net log.2. The DLL is the main database for the service. I want the DLL to writeto the same ... |
| 06/12/2006 11:16 AM | Introducing NetLogClient 2.0 (Ripsaw) |
| Replies: 6 |
I hope this isn't off-topic; I think it is relevant, if not, please excuse me.NetLogClient 2.0 beta 3 has just been released. It is an open source UDP log event viewer written in C# 2.0. This application should be suitable for use with Apache's log4j or log4net logging frameworks. (log4net must be version 1.2.10 or higher).Any feedback on it would be most appreciated.... |
| 06/10/2006 5:44 PM | Trouble using AdoNetAdapter with .net 2.0 project |
| Replies: 5 |
Hi all,When trying to log into an access db using the AdoNetAdapter with an OleDbconnection i get the following error in a VS 2005 (.NET 2.0) project.Please take note that the exact same project with the same configurationworks fine under .NET 1.1 (VS 2003).A first chance exception of type'System.Runtime.InteropServices.InvalidComObjectException' occurred inSystem.Data.dlllog4net:ERROR [AdoN... |
| 06/10/2006 2:30 AM | OutputDebugStringAppender w/ VS2005 |
| Replies: 1 |
I am writing a windows EXE application and trying to use theOutputDebugStringAppender to get a dump in the output window of VS2005with no luck. Here is the app.config:------------------------- <log4net> <!-- Define some output appenders --> <appender name="RollingLogFileAppender"type="log4net.Appender.RollingFileAppender"> &nbs... |
| 06/08/2006 9:05 AM | how to set property for application level |
| Replies: 5 |
How can I set a property in application level so that all logs produced fromthat application will have this property in log file, including all logsproduced from other assemblies used by this application?For example I want to all my log has an property "appname" to stored thevalue of application name. I tried to set an application name:ThreadContext.Properties["appname"] = "App1";This doesn't work... |
| 06/08/2006 6:04 AM | Logging Thread Context Properties |
| Replies: 3 |
I must be missing something here… I’m trying to setup a thread property in my background thread such that my appender can inspect the property when an event is logged:
The thread does this:
log4net.ThreadContext.Properties["ThreadTaskDescription"] = “<some string>”;
log.Info(“Some message”);
In the appender, when I look at the Properties property of the ... |
| 06/08/2006 6:02 AM | problems with windows service |
| Replies: 2 |
Hello,I have created a windows service, installed it to use the (at first) thelocal system admin account, then the local system account. I haveverified that I have the necessary permissions (by simply creating afile & writing to it), but log4net is showing Is...Enabled = false onall levels.my config looks like this:<configuration> <configSections>  ... |
| 06/02/2006 5:04 AM | NDC and MDC fields logged as (null) |
| Replies: 12 |
I am using the 1.2.10. The NDC and MDC fields are logged in file as (null)if they are no value. Are they supposed to just log empty string if thereare no values?Thanks.___________________________________________________________Sent by ePrompter, the premier email notification software.Free download at http://www.ePrompter.com._________________________________________________________________Express... |
| 05/31/2006 12:07 AM | Compress & Delete old logs |
| Replies: 3 |
Is there a way with the rollingfile appender to have it compressitself as it is rolling to the next file? I would name my logs bydate, and would like the old files to compress (zip, cab, some formatreadable without extra installs) as a new file is being created.Also, is it possible to have a max number of files saved? We wouldlike to only keep the last x days of logs.So day to day the ... |
| 05/29/2006 6:15 PM | Re: RE: LoggerMatchFilter question |
| Replies: 1 |
Hi Nicko,Thanks.I know and tried it. But it doesn't work and I don't know why. I tried all Filters from log4net and my own one, started my real or test app with and configured log4net. Then I looked into the lo4net root logger and it's appenders (via Quick Watch) and all filters are in the filter chain of my RollingLogFileAppender, except log4net's LoggerMatchFilter and my own one. Either if my ow... |
| 05/27/2006 12:58 AM | Best Method For Temporary Appender |
| Replies: 1 |
Hi all-I've been successful using log4net in a fairly conventional manner for a Windows Mobile 5.0 project (e.g., using XmlConfigurator with both an AdoNetAppender and a FileAppender). However, now I would like to use log4net to output filtered log messages to a startup screen with a TextBox control. The key issue here is that the startup screen is temporary--it will only be displayed for ~30 seco... |
| 05/24/2006 10:56 PM | Custom level usage |
| Replies: 3 |
I am using the version 1.2.10. I am not quite sure how to use the customlevel. In the previous email I knew that I have to define a custom level inconfig file as follows:<level> <name value="ACTIVITY" /> <value value="40000" /></level>I define a log in my class as follows:protected static readonly ILog log =LogManager.GetLogger(MethodBase.GetCurrentMethod().Decl... |
| 05/22/2006 10:49 PM | CF 2.0 Compilation?? |
| Replies: 2 |
Hi all,
I need to compile log4net 1.2.10 for the .Net 2.0 Compact Framework (unless the binary is available online and I just didn't see it).
Are the correct conditional compilation symbols: "NET;NET_1_0" or are they different for the compact framework?
TIA,
Jon |
| 05/22/2006 9:35 PM | RE: AdoNetAppender: logging via stored proc: |
| Replies: 1 |
Hi,I am trying to log to database using stored proc instead of the inserttext in the config file...my config file adonet appender is asfollows...<appender name="AdoNetAppender_Oracle"type="log4net.Appender.ADONetAppender"> <connectionTypevalue="System.Data.OracleClient.OracleConnection,System.Data.OracleC... |
| 05/19/2006 3:05 PM | Non Buffering SMTP Appender |
| Replies: 2 |
Hi,I'm using log4net 1.2.10.0 and I'm encoutering the problem that the SMTP Appender does not buffer. I receive an e-mail for every log message. This is the appenders configuration:<appender name="SmtpAppender" type="log4net.Appender.SmtpAppender"> <to value="mail@domain.de" /> <from value="otherMail@domain.de" /> <subject value="Error message" /> &l... |
| 05/18/2006 11:02 PM | AdoNetAppender: |
| Replies: 3 |
Hi
I am trying to log messages to Oracle 9i database table 'Log". I am getting error while initializing AdoNetAppender…following is the log…
log4net:ERROR DOMConfigurator: Could not create Appender [AdoNetAppender_Oracle] of type [log4net.Appender.AdoNetAppender]. Reported error follows.
log4net:ERROR DOMConfigurator: Could not create Appender [AdoNetAppender_Oracle] of type [log4net.Appende... |
| 05/18/2006 4:46 PM | Enabling an appender at run time |
| Replies: 1 |
In my library's log4net setup I have two RollingFileAppenders enabled bydefault. If the user logs on to a database (depends on the application),I want to enable additional AdoNetAppenders with connectionstringspointing to the database the user is logged on to (multiple choices).I believe I have three options (?)1. Use a XML file for my RollingFileAppenders, dynamically addingAdoNetAppenders at run... |
| 05/17/2006 7:34 PM | LoggerMatchFilter question |
| Replies: 1 |
Hello.I would log messages from all types of a specific module (e. g. caching) toan extra appender, lets say to a TraceAppender. "Module" means that theclasses functionalities are related to one topic, but they are in differentnamespaces and possibly different assemblies. So I thought I could use theLoggerMatchFilter for this, but it does not work because the filter uses thestring.StartsWith() met... |
| 05/13/2006 4:06 AM | AppenderSkeleton not thread safe |
| Replies: 1 |
Since the AppenderSkeleton class is not thread-safe (per the SDKreference), none of the appenders are thread-safe - even ones likeEventLogAppender.According to Nicko Cadell,> How log4net implements this with regards to individual appenders isnot> really important. The docs for the RollingFileAppender are correct,the> members of the type are not thread safe, but this is not relevantunless&... |
| 05/12/2006 6:24 PM | Permissioning |
| Replies: 1 |
Hello,I am getting the following error when trying to open a logfile on alocal drive with plenty of disk space in a folder that exists. The filedoes not currently exist."Additional information: Request for the permission of type'System.Security.Permissions.FileIOPermission, mscorlib,Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'failed."Can anyone point me in the direction... |
| 05/11/2006 10:44 AM | Minor documentation issues |
| Replies: 0 |
Hello,The introduction makes no mention of .NET 2.0 supporthttp://logging.apache.org/log4net/release/manual/introduction.html#frameworksWhereas it is mentioned as being supported herehttp://logging.apache.org/log4net/release/framework-support.htmlAlso, a 404 is being generated for the "Example Appender Configuration" linkhttp://logging.apache.org/log4net/release/manual/configuration.html#appenders... |
| 05/11/2006 5:55 AM | Assembly Redirect Between 1.2.9.0 and 1.2.10.0 |
| Replies: 0 |
Hi, I'm using Spring.Net (log4net version 1.2.9.0) and using log4net 1.2.10.0 for the application that I'm writing.I'm trying to use the runtime element to change the assembly binding to the new version of log4net.However, I noticed that the publicKeyToken has changed between the two versions. Is it even possible to perform a binding redirect if the public key token is different between the ... |
| 05/10/2006 2:50 AM | Problems logging |
| Replies: 2 |
I have two applications that use log4net (1.2.9.0) and both are configured the exact same way. Yesterday, one of the applications suddenly stopped logging. A trace of the two apps revealed the following:
App One (Does not work)
log4net: log4net assembly [log4net, Version=1.2.9.0, Culture=neutral, PublicKeyToken=b32731d11ce58905]. Loaded from [c:\windows\microsof... |
| 05/10/2006 2:01 AM | how to get host name? |
| Replies: 4 |
I am using AdoNetAppender. I want to log the name of the machine thatis running the application.I tried following but doesn't work:<parameter> <parameterName value="@p_ServerName" /> <dbType value="String" /> <size value="50" /> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%property{log4net:HostName}" />&... |
| 05/06/2006 6:19 AM | Log4net Fails to Log |
| Replies: 5 |
Hi Log4net Support team:
We are trying to log into a SQL server database through log4net. Attached is the code file where log4net is called to do the logging.
We are doing a load test with multiple threads of the object of a class that uses the attached class/method.
Logging by log4net just stops randomly sometimes after 3 minutes - 8 minutes. ... |
| 05/06/2006 2:18 AM | couple questions |
| Replies: 2 |
I am pretty new to log4net, just started using it weeks ago. It works great.I have a couple questions:1. AdoNetAppender: all examples I could find are using insert statementwhich is not possible in my case, could someone point me some examples thatusing stored-procedures?2. custom level: custom level is supported in new release but I stillconfused in how to use it. for example if I want to add a T... |
| 05/05/2006 1:35 AM | Rolling doesn't work based on size |
| Replies: 4 |
RollingLogFileAppender doesn’t roll file based on size. It is used within windows service.
Here’s part of my configuration file:
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="${windir}\\ FaxService.log" />
 ... |
| 05/04/2006 8:51 PM | notification event for a modified configuration? |
| Replies: 0 |
Hi,
I am using ‘log4net.Config.XmlConfigurator.ConfigureAndWatch(configFileInfo)’ to configure my application’s log4net settings, but then I am programmatically making some minor changes to the settings.
When the config file changes, log4net updates the settings, but I no longer have the minor changes I originally made programmatically.
Is there a way I can be notified... |
| 05/01/2006 6:52 PM | Different versions |
| Replies: 5 |
HiThis isn't really an issue about log4net, but two programs which uselog4net, but I hope someone can offer some advice.I have some classes which use log4net (ver 1.2.9.0). These classes runinside a cms-framework - which apparently also uses log4net internally,butversion 1.2.0.3. This causes problems with my classes - I get an errorlike:Could not load file or assembly log4net, version=1.2.9.0, cul... |
| 04/28/2006 8:45 PM | AdoNetAppender questions |
| Replies: 1 |
Hi thereI have a couple of questions regarding AdoNetAppender, which I am usingto log to a SQL Server database.(1)Can someone explain the use of the "date-time" parameter? For example, Itry this:<parameter> <parameterName value="@log_date" /> <dbType value="DateTime" /> <layout type="log4net.Layout.PatternLayout" value="%date{yyyy-MM-ddHH:mm:ss,fff}" /><... |
| 04/28/2006 5:24 PM | How to identify a computer in log output? |
| Replies: 1 |
Hi thereI have several machines all running the same program, all accessing thesame database.I want to log events from these machines to the same database.Is it possible to configure log4net to automatically include the"machine name" or some other unique identifier from the particularmachine in the log?At the moment we can't tell which machine a particular log output comesfrom.Thanks,Peter |
| 04/28/2006 3:51 AM | Use properties in log file name |
| Replies: 3 |
I would like to use the host name in the log file's name: <appender name="LogAppender" type="log4net.Appender.FileAppender,log4net"> <file value="logs/RecBuilder.[%p{log4net:HostName}].log" />But this doesn't work.When I look at log4net's internal log, it says it cannot create theappender because:"System.NotSupportedException: The given path's format is notsuppo... |
| 04/26/2006 9:51 PM | Adding A Memory Appender at Runtime |
| Replies: 0 |
I'm trying to add a memory appender to root via code, like so...
Private Sub SetUpLogging()
Dim RootLog As ILog = LogManager.GetLogger("root") Dim connectionAppender As IAppenderAttachable = RootLog.Logger
Dim MemoryApp As MemoryAppender = New MemoryAppender() MemoryApp.Name = "ThanksForTheMemories" MemoryApp.ActivateOptions() connectionAppender.Add... |
| 04/24/2006 11:25 PM | Remoting server - health check? |
| Replies: 0 |
Hi,I'm using the Remoting appender and also a Remoting server (as included in log4net distribution and runs as an NT service) to receive the events on the remote sink. Can anyone suggest the best way to provide an "IsAlive" function to this service so I can check whether the Remoting service is alive and well?Thanks,Simon. |
| 04/24/2006 5:13 AM | Interface method to request the level of a Logger? |
| Replies: 4 |
Hello,
Is there an interface method to get the current level of a Logger? Using the ILog interface, I can determine whether certain levels are enabled via the IsxxxEnabled property, but I was hoping to be able to make one call to get the current Logger level. It might seem like an odd request, but we will be passing that info on to a lower level component.
Sorry if ... |
| 04/22/2006 2:43 AM | No enumerable context anymore? |
| Replies: 1 |
Sorry if this has been covered a million times.
I used to iterate through the MDC of a given LoggingEvent when rendering. Something like this:
// Append the MDC values if any exist
if(loggingEvent.MappedContext != null && loggingEvent.MappedContext.Count > 0)
{
foreach(DictionaryEntry entry in loggingEvent.MappedContext)
 ... |
| 04/21/2006 11:18 PM | Uncaught IndexOutOfRangeException in log4net 1.2.9 Beta |
| Replies: 1 |
Hi,We're in the process of updating our logging from version 1.2.0 beta 8 (DLL version 1.2.0.30714) to the 1.2.9 beta and are experiencing an uncaught error when our test system is placed under load.We're running version 1.1 of the MS .Net framework on Windows 2003 Server, and have also seen this on Windows XP Pro SP2.We have a server process which catches all exceptions and logs them as errors.&n... |
| 04/20/2006 3:41 PM | Layout settings not applied to custom event appender |
| Replies: 3 |
Hallo everyone,I have implemented a really simple event appender, which allows me toforward the message from the Log4Net Framework in my own application.This also works fine, but the layout settings from the configurationfile are not applied to my appender. The same Layout settings work finefor the default appenders, which I removed for simplification. I addedthe appender source code and config be... |
| 04/20/2006 6:09 AM | How to log a namespace? |
| Replies: 3 |
Hello,How can I restrict the logging to a namespace or a class?My project uses several namespaces and classes, and I'd like to haveseveral log files:* one for all classes (done)* other log files for just one class or just one namespace.Thank youJulien |
| 04/20/2006 4:34 AM | Question about the RollingFileAppender |
| Replies: 6 |
Does the RollingFileAppender (or the FileAppender) have the ability to have several processes all log to the same log file? This would really be helpful, so if we have some bug that involves more than one process. I guess it would have to open the file and prevent others from opening it in read/write mode in order for that to work, and it would probably also need to have retries built ... |
| 04/20/2006 2:47 AM | [ANN] log4net 1.2.10 Released |
| Replies: 0 |
log4net 1.2.10 Released-----------------------Log4net developers are proud to announce the release of log4net 1.2.10.This release includes many enhancements and bug fixes.The log4net website documentation has been updated to be in sync withthis release.The release notes are available fromhttp://logging.apache.org/log4net/release/release-notes.htmlThis release can be downloaded fromhttp://logging.a... |
| 04/19/2006 12:39 PM | logging stops under wwwroot |
| Replies: 4 |
Hi
I am having a problem with Log4net. I am using log4net 1.2.0. I have a asp.net , c# web application running in windows2000 server. When the application is placed in any folder and created a virtual directory in IIS , it works fine- log file is created (ie . file appender works fine). but if I place the application under c:\inetpub\wwwroot, it s... |
| 04/19/2006 12:21 PM | Re: Re[4]: Logging of the errors in logging |
| Replies: 0 |
If we changed ILoggerRepository to add an ConfigurationMessageEventevent: public interface ILoggerRepository { // snip event LoggerRepositoryConfigurationMessageEventHandler ConfigurationMessageEvent; }someone could write an IPlugin that inspected the message to determineif it were an error-config-message or just a debug-config-message. Thisplugin would have ... |
| 04/19/2006 5:54 AM | Oh where, oh where has my little RenderException() gone? |
| Replies: 3 |
I use the old RenderException method in a class that derives from DefaultRenderer to get Exceptions to into a workable XML format.
Looking through 1.2.9 stuff, I see that this has gone far, far away and isn’t listed in the breaking changes section of the docs. Was anyone else using this method and found a work around without having to customize log4net source?
override protected string Ren... |
| 04/19/2006 3:32 AM | Log4Net 1.1.1 Documentation? |
| Replies: 5 |
Does anyone know where I can get my hands on a copy of the Log4Net 1.1 Manual? I found the API documentation in the ZIP file, but that isn't very helpful for a newbie like me trying to learn how to use and configure Log4Net. Also, I found the Log4Net 1.2 Manual online, but I'm not sure what all the differences are between 1.1.1 and 1.2. The reason I'm using 1.1.1 is that the prod... |
| 04/18/2006 8:47 AM | Rolling File Logs contain junk for non-English OSes |
| Replies: 3 |
Can someone please tell me a work-around for this?When I have localized text returned to me by the OSthat I need to log, the rolling file logs contain junkcharacters such as:ƒƒOƒIƒ“ޏ”s:ƒ†[ƒU[–¼‚ð”Fޝ‚Å‚«‚È‚¢‚©A‚Ü‚½‚̓pƒXƒ[ƒh‚ªŠÔˆá‚Á‚Ä‚¢‚Ü‚·Bƒpƒ‰ƒ[ƒ^‚ªŠÔˆá‚Á‚Ä‚¢‚Ü‚·BSwami__________________________________________________Do You Yahoo!?Tired of spam? Yahoo! Mail has the best spam pro... |
| 04/15/2006 5:10 AM | log4net-events.dtd file |
| Replies: 0 |
I am currently logging in Xml layout. I need to get thelog4net-events.dtd file. I could not find this as part of the log4netdownload.Thanks,Meera. |
| 04/14/2006 2:24 AM | Issue with Repositories and configuration... |
| Replies: 3 |
I have an assembly that I want to use respositories for. It has thefollowing declared in the AssemblyInfo.cs file:// We want this assembly to have a seperate logging repository to the// rest of the application. We will configure this repository seperatly.[assembly: log4net.Config.Repository("My.Network")]// Configure logging for this assembly using the'My.Network.dll.log4net.config' file[ass... |
| 04/12/2006 7:15 PM | BufferingForwardingAppender, another question |
| Replies: 1 |
Hi.Yesterday I had the problem that an NHibernate operation took 3202 ms andthe complete callback about 6 seconds, which obviously is too long. So Iconfigured an extra logger for the NHibernate namespace hierarchy with levelINFO instead of DEBUG an the same operation has finished after 76 ms. Butlogging root with DEBUG and NHibernate only with info does not work for usduring development. So I thau... |
| 04/12/2006 6:44 AM | Using BufferingForwardingAppender based on size of message vs number of messages |
| Replies: 9 |
Sorry bout that. Didn't mean to hijack Daniel's thread. He had a note onBufferingForwardingAppender in his thread, which is why I wanted to findmore info on it.My question is this: Currently in the BufferingForwardingAppender, thenumber of messages to be buffered can be set using bufferSize. Is thereany way to carry out the buffering based on the size of the messages?Thanks,Meera. |
| 04/11/2006 10:36 PM | Accessing Appender that was created via config file? |
| Replies: 3 |
Hi all,I am currently in the process of switching my app and a few libraries Iwrote to log4net. So far everything works fine, but now I am at a pointwhere I need the help of people who have more insight into log4net than me.I want to accomplish two things: First I want an appender to output to amultiline textbox of my app. I think that this might be easiest by workingwith an appender similar to Fi... |
| 04/06/2006 10:08 PM | Logging for selected Log levels |
| Replies: 1 |
Is it possible to explicitly turn logging on for Debug, Warn and Fatal messages. In other words only the specified log levels should be recorded and no other messages like Info and Error should be recorded? Currently in the log4Net examples it allows to specify just one loglevel (ie either debug, Warn, etc or All) – but is there some way to just turn on logging only for specific levels and ignor... |
| 04/06/2006 6:24 PM | Loggin to multiple appenders |
| Replies: 2 |
Greetings All,Is it possible to write to more than one appenders? In the FAQs I read that it is possible to do so, but could not find an example.I would like to write the debug logs to a fileappender (if debug logging is turned on), and info logs to a database. Is this possible with log4net?ThanksSaurabh |
| 04/05/2006 10:23 PM | Logging of the errors |
| Replies: 2 |
Hi Ron,I want to log into my LocalHost for errors. But does not seem to dothat. <appender name="RollingLogFileAppender"type="log4net.Appender.RollingFileAppender,log4net"> <param name="File" value="http://Localhost/SSOPAppLog.txt" /> <param name="AppendToFile" value="true" /> <... |
| 04/04/2006 5:37 PM | Dynamic Appenders |
| Replies: 0 |
Hi,I am really a newbie at log4net. I want to dynamically configure loggers, and I do this as follows:private static ILog ConfigureLogger(AuditType logType, string destination) { switch (logType) ... |
| 04/03/2006 11:43 PM | Class Library Logging |
| Replies: 1 |
Hi,
I am using V1.2.0-beta8, on a test .DLL written in C# against .NET1.1 with the DLL being called from a C# windows application.
I have this attribute in the the Assemblyinfo.cs file:
[assembly: DOMConfiguratorAttribute(ConfigFile="UIFeasibility.log.config",Watch=true)]
I am setting up the logger as follows:
private static readonly ILog log = LogManager.GetLogger(Sys... |
| 03/30/2006 3:51 PM | Log4Net suddenly stops logging |
| Replies: 1 |
Hi,
I am using log4net 1.2.0-beta8 in a multithreaded windows-service written in C#. The application is using the RollingFileAppender. While performing some load tests, where a large number of entries have been written, suddenly it can happen that no more log lines are written while the application itself still continues to work properly.
I could read from previ... |
| 03/30/2006 3:43 PM | Logging of the errors in logging |
| Replies: 4 |
Log4net is a great tool but I'm not fully satisfied how log4net dealswith errors in logging. In my project it is necessary not to lose anylogging messages if the logging is on so I would prefer log4netthrew exceptions rather than wrote errors of logging intoConsole.Error and Trace as information messages. I'm ready to catchsuch sort of exceptions at the top level of my code. But I have no wayto ov... |
| 03/30/2006 6:31 AM | .Net v2 support |
| Replies: 5 |
Hi,Are there plans for Log4Net to support .Net V2? If so, any idea when that might happen?Regards,Sylvain. |
| 03/28/2006 3:15 PM | Locking of file by RollingFileAppender |
| Replies: 1 |
I am using Log4net RollingFileAppender to log messages in a local fileand roll the file based on Size and time.Scenario:There can be multiple instance of my application running on windows.All instances log the message using log4net rollingFileAppender intosame file (may be at same time). But when they try doing this, I got thefollowing error:log4net:ERROR [LoggerRollingFileAppender] Unable to acqu... |
| 03/25/2006 5:12 AM | Question about NDC and appenders |
| Replies: 5 |
Can I configure log4net to route messages from a specific NDC context toa appender?- Morten |
| 03/25/2006 4:47 AM | newbie question about configuration |
| Replies: 7 |
Hi .Net developers,I've been trying to get the log4net 1.2.9 beta's WebApp example to work underASP.NET 2.0 without any luck (using C# in VS2005). I don't get any log filesnor trace output when I go to http://myhost/WebAppCS/Trace.axd. Here are thethings I've tried to do:- make sure the directory for the log file is writable- setting the output log file with absolute path (c:\tmp\webap... |
| 03/24/2006 9:26 PM | ~/MyLogFile.txt |
| Replies: 3 |
HiIt would have been grate to be able to configure the logging directoryfor my application, for example, in a environment variable.Before: <file value="c:/LogFiles/log4net/MyLogFile.log"/>After: <file value="~/MyLogFile.log"/>--Best Regards*Morten Andersen... |
| 03/22/2006 8:01 AM | Request for log4net xml schema |
| Replies: 1 |
Dear all,Can someone point me to where I can download the xml schema for log4net?Many thanks,Sokun |
| 03/21/2006 7:21 AM | ADONetAppender.ActivateOptions() causes Connection Leak? |
| Replies: 2 |
I am modifying the buffer size and the connection string of ADONetAppenders programmatically and I am getting a SqlConnection leak. The number of open connections to SQL Server grows to the max connection pool size when I do this repeatedly.
The leak occurs when I call ActivateOptions on the ADONetAppender after I set its BufferSize and ConnectionString. The documentation says... |
| 03/18/2006 5:34 PM | SmtpAppender and flooding |
| Replies: 1 |
Hi!If, for example, our SQL server goes down I get allot of mails from the SmtpAppender. The content of the emails is the same, so a ignore repeated lines function would have solved the problem.Is it another way I can prevent this?
--
Best RegardsMorten AndersenDeveloperVianett AS | morten@vianett.no | Office: +47 69 20 69 74 | Skype: mortander |
| 03/17/2006 8:35 AM | adding a from title for the smtp appender |
| Replies: 1 |
Hi there, i was wondering if there is a way to add a from title in thesmtp appender, it just uses the alias. |
| 03/17/2006 7:42 AM | Logging to particular levels + buffering smtpappender |
| Replies: 4 |
Hi there, I was wondering if there was a possibility of being able tolog to file all levels except the debug level which i want the consoleonly to display ? Also how is it possible to buffer all the logs goingto smtp appender and send it once the program has finished or exitingwith an error ? I only one to recieve one email not many really. Let meknow. |
| 03/16/2006 1:21 PM | Reducing memory dynamic allocation and GC.Collect |
| Replies: 0 |
Hi,
I'm looking for ways to reduce or avoid dynamic memory allocation in Log4Net.
Is there some ways to do this, like using a memory pool, wrapping a managed other library like Log4Cpp,
or some best practices how to use Log4Net for this problem?
We think that because of the dynamic allocations the GC.collect just happens on the wrong time and lowers our performances.
Thanks,
... |
| 03/15/2006 5:15 PM | Log4net throws exception |
| Replies: 13 |
Hi!log.DebugFormat("Hello {0}! Where is {1}?, "Morten");I know that I am missing an argument. The problem here is that some of my applications went down because of this.
--
Best RegardsMorten AndersenDeveloperVianett AS | morten@vianett.no | Office: +47 69 20 69 74 | Skype: mortander |
| 03/13/2006 11:13 PM | Xml schema for Log4Net configuration |
| Replies: 3 |
Hi,
I need to get the XML schema for the Log4Net Configuration settings.
Thanks,
Meera
|
| 03/10/2006 6:21 AM | Issues using from .net debugger |
| Replies: 2 |
Hi, Just started experimenting with log4net, and ran into the followingproblem. I'm using the the 1.2.9-beta version. I'm using VS 2003, with .net 1.1 I took the VB.Net Console App example, changed it to use the 1.1version of log4net.dll I run it through the debugger, and on occasion it fails to start up.Around say one in 10-... |
| 03/09/2006 9:49 PM | Help with XmlLayoutBase |
| Replies: 2 |
Hi Everyone,I interested in logging with log4net generating an XML file with thelog4net.Layout.XmlLayoutBase Skeleton.Can anybody help me out on what parameters I need to declare under the<layout> field, like Schema, etc...Or maybe someone has an example of developing with thelog4net.Layout.XmlLayoutBaseThks in advance for any help.Julian. |
| 03/07/2006 4:35 AM | Log4net with .net 2.0 for com+ servicedcomponent |
| Replies: 4 |
I have a working c# exchange event sink (serviced component) that will do things like autoaccept, log message activities in a database and route messages. I wanted to use log4net with this but am having problems
The core problem is that i am not getting any log messages (though i tried various configurations)
log4net compiled from source in .net using NET_2_0 compile d... |
| 03/04/2006 12:52 AM | RemotingAppender and threads |
| Replies: 1 |
Hi,I've been doing some research on the .NET thread pool, which is used by the Remoting appender in log4net 1.2.9. If I understand correctly, the thread pool is also used to service ASP.NET page requests. Right now I'm using log4net in an enterprise trading application, so the load and amount of information logged can be pretty high.My question is, won't log4net's use of the ThreadPool adversely a... |
| 03/03/2006 12:00 AM | RollingFileAppender thread safety |
| Replies: 2 |
I need to use the RollingFileAppender in a multi-threaded application. The documentation is alittle confusing when it comes to thread safety. The general FAQ says log4net is thread-safe, butthe appender's documentation says it's not.Does anyone have any suggestions on how to use the RollingFileAppender in a multi-threadedapplication? Do I need to modify and try to compile the cod... |
| 03/02/2006 10:42 PM | log4NET from a class library (dll) |
| Replies: 2 |
Hello,I want to log messages from a class library(dll).This dll is called by athird party application on which I have no control. In other words, I cannotmake the third party application read a app.config file.A dll by its very nature does not allow loading of app.config file. I amalso not able to find an AssemblyInfo.cs file to make changes to point tothe config file.I can hard code log4net as ... |
| 03/02/2006 4:19 PM | Double configuration and SmtpAppender configuration |
| Replies: 1 |
Hi, I need some help.
1) I want to configure log level for Log4net.MainForm logger in the following maner:
<root>
<level value="ALL" />
</root>
<logger name="Log4net.MainForm">
<level value="WARN" />
... |
| 02/28/2006 4:55 PM | Setting AdoNetAppender parameters to null |
| Replies: 2 |
Hi
I posted this previously in an earlier thread but haven’t received a reply yet so thought I would try it on it’s own thread…
I've been using properties to send several user-defined messages via the ADO.NET appender. This works great except when I'm trying to set a parameter value to DBNull.Value (to set the column value that this parameter relates to to null), e.g. using the... |
| 02/27/2006 8:14 PM | Multiple filters |
| Replies: 1 |
I would like an appender to log everything bar 2 levelseg: I don't want to log ERROR and INFO level logs.What would the config look like for this?I've tried adding the following filters to the appender:<filter type="log4net.Filter.LevelMatchFilter"> <levelToMatch value="ERROR" /> <acceptOnMatch value... |
| 02/24/2006 6:03 PM | logging not possible in finalizer on application shutdown? |
| Replies: 2 |
All,I'd like to log some information in a protected virtual void Dispose(bool disposing)method which can be called either by Dispose() or by the finalizer(implemented according to Microsoft's proposal "Implementing a DisposeMethod"; seems-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/cpguide/html/cpconimplementingdisposemethod.htm).If Dispose(bool disposing) is called by Dispose() everything w... |
| 02/24/2006 1:45 AM | RE: a question about .Net 2.0 and log4net |
| Replies: 1 |
Ken,
The http://logging.apache.org/log4net/release/framework-support.html
page lists the frameworks that we build log4net for. We build specific
versions for each framework to take advantage of new features that are
available in new frameworks. This page lists the minor differences
between the builds.
The log4net assemblies support binary backward compatibility. The .NET
1.0 build... |
| 02/24/2006 12:11 AM | custom level |
| Replies: 1 |
Is there any easy way to add a new level between ERROR and OFF?Thanks |
| 02/23/2006 3:32 PM | Adding appenders programmatically |
| Replies: 1 |
I need to add programmatically references to appenders to a specific logger. In other words I want to configure the following logger from code. Is it possible?
<logger name="Log4net.MainForm">
<level value="ALL" />
<appender-ref ref="AdoNetAppender" />
<appender-ref ref="... |
| 02/22/2006 11:41 PM | Write(Level level, string message) |
| Replies: 1 |
Are there such methods as Write(Level level, string message); available?
Best regards,
Kovalenko Vladimir
|
| 02/22/2006 4:32 AM | please verify my config file. |
| Replies: 3 |
Hello group,
I’m having a problem where I’d like to limit the smpt appender to only send INFO messages and thought I configured my file correctly. What am I doing wrong?
Thank you,
Stephen
<log4net>
 ... |
| 02/17/2006 9:30 PM | How to have an overall ERROR level, except for one specific logger (log4net 1.2.8) ? |
| Replies: 2 |
HiI feel kind of stupid - I don't manage to filter things like I need: I want to have all loggers triggered above ERROR, except for one logger which I'd like to trigger on INFO (I'm infortunately using version 1.2.8).is it possible ?cheersThibaut |
| 02/17/2006 6:52 PM | Appdomain with log4net |
| Replies: 2 |
Hi,After not being able to solve this myself, I'm looking for some sort of best practise solution to a problem that I'm facing: My app (console app) has 2 appdomains, both of which need to log. In an ideal world, they would both log to the same place (in this instance a RollingFileAppender) and if there is non-convoluted manner in which to do this, that would be great (with both appdomains being g... |
| 02/16/2006 9:13 PM | ADO.NET appender parameters |
| Replies: 3 |
Hi
I would like to perform some logging with the AdoNetAppender
using custom parameters and values (i.e. not just using a built in value like %thread)
so that I can, in effect, send several user defined messages (other than just
%message) to separate parameters of the stored procedure with a log. I’ve
noticed in a recent mail the use of loggingEvent.Properties[“@textData... |
| 02/16/2006 11:51 AM | Can log4net be used with Test Project type project in Visual Studio Team System 2005 Beta2 (VSTS) |
| Replies: 0 |
Hi I create a Test Project in VSTS. This kind of project is a special type of project test methods in which can be recognized by Test Manager window or Test View window. I modify the code in the project with some logging code with log4net. Then run it from Visual Studio Command Prompt with MSTest, or from Test Manager window. But no log file created with logging message. Does log4net support Test ... |
| 02/16/2006 9:48 AM | How to log for a ClassLibrary project, but not a Console Application project? |
| Replies: 3 |
Hi I have tried logging for Console Application project. It goes well. And I also tried logging in Class Library project (with code like"Logger.Debug("...");") called by a Console Application project (with .config). This is allright too. But If I only applied log4net in a Class Library project, or a Class Library project called by a Windows Application project, it didn't run well. Can log4ne... |
| 02/16/2006 6:25 AM | Problem with log4net |
| Replies: 1 |
I have created a test console application…
using System;
using log4net;
namespace ConsoleApplication1
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class Class1
{
&... |
| 02/16/2006 2:47 AM | Question: Changing Log Settings in run time |
| Replies: 1 |
Is there a way to change the log settings after application started?
Log Settings are loaded from App.Config file.
I would like to change the log level according to user selection while the application runs.
So if he selected info and error, I will only output those.
And then, once he changed that, is there a way to persist his selection without manipulating the XML f... |
| 02/15/2006 8:46 PM | log4net Contexts and ASP.NET |
| Replies: 10 |
I've seen an email from Piers Williams in december asking about this.Basically - in an ASP.NET application - none of the existing contextsare "safe" to use.I'd like to remedy this. There are two ways forward that I can see.1. Add a new WebContext class.2. Change the ThreadLogicalContext class to use the HttpContext ifrequired. The safest way to do this would be to add a configurationoption to <... |
| 02/15/2006 5:38 PM | SmtpAppender and SSL |
| Replies: 5 |
Hi.
I am currently experiencing the following problem: I am using SmtpAppender. E-mails are sent via smtp.gmail.com which uses SSL. My configuration file looks like that:
<appender name="SmtpAppender" type="log4net.Appender.SmtpAppender"> <authentication value="Basic" /> <username value="username" /> <password value="password" /> <to val... |
| 02/14/2006 5:08 PM | Threshold doesn't work? |
| Replies: 1 |
As I read in the FAQ I used the treshold tag to separate to output of each aprender depending of a level,
This is my configuration file
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
<... |
| 02/14/2006 2:41 AM | Custom Log File Directories |
| Replies: 3 |
Hello all,
I’ve been using l4n very successfully for the last 9 months (holy crap, has it been that long?) with one small problem pertaining to the custom directories that are created for the log files. I am using custom date patterns to put log files under directories named after the year and month that the log files were created. So if I was to create a log file today (feb 13, 2006) t... |
| 02/12/2006 12:31 AM | Flushing a buffered appender |
| Replies: 3 |
If you have an appender buffering log events, is there a method to flush all the buffers and send the log events.
One example of when I want to use this is when my application closes. I want to make sure all my log messages are output before I exit.
thanks,
Nick |
| 02/11/2006 1:12 AM | .NET Framework 2.0 supported? |
| Replies: 1 |
Hi,are the .Net Frameworks 2.0 (full and compact) supported? Or are there someissues? They aren't listed under "Supported Frameworks".Thanks for the infos.- Florian--Telefonieren Sie schon oder sparen Sie noch?NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie |
| 02/10/2006 6:15 PM | Is it possible to have in the same logger different appender depending of the level? |
| Replies: 1 |
Hi,
I am pretty newbie using log4net and I would like to have for a asp.net page a rolling file appender for the debug log statement and other smtp appender for error logs statements.
Is it possible to achieve this behaviour?
Thanks in advance.
Jose Antonio Cortijo Solera
Dpto. de Informática
INDITEX TEMPE
mailto:joseacs@tempe.es
Tlfno. 966657500 Ext. 40969
&nbs... |
| 02/10/2006 5:14 PM | RollingFileAppender just overwrites the same file |
| Replies: 1 |
Hi all,Newbie question, I appreciate any advice.Below is my log4net config, copied fromhttp://logging.apache.org/log4net/release/config-examples.html#rollingfileappenderIt is restarting the file each day - but it's overwriting it.I was expecting it to rename the old one to logfile-20060209 orsomething.log4net 1.2.9 beta, debug .net framework 1.1 build.CheersIain Shepherd<log4net><appender... |
| 02/10/2006 1:22 AM | How do you put a null value into a db field with ADONetAppender |
| Replies: 1 |
I am trying to set a SQL Server text field to null if the string I am putting in is null.
If I set the properties like this:
if (stringText == null)
loggingEvent.Properties["@textData1"] = System.DBNull.Value;
else
loggingEvent.Properties["@textData1"] = stringText;
An exception is thrown in log4net when it trys to execute the... |
| 02/08/2006 5:53 AM | Performance Issues - log4net with Visual Basic 2005 |
| Replies: 3 |
Hi, I am using log4net with Visual Basic 2005 and was wondering if thereare any performance issues with multiple threads of a same process writingto 1 file. I basically have a process which has a pool of 25 threads doingsome processing and all these threads write to the same file. Once in awhile we see some methods taking a little bit longer time tha... |
| 02/08/2006 3:51 AM | setting RollingFileAppender output file name based on appdomain in ASP.NET application |
| Replies: 4 |
hi,I have several services and an ASP.NET application installed on the same machine.I want to use the rolling file appender and have each process log into its own set of files. ideally i would like to use one log4net configuration file to configure logging for all the running processes.I figured out how to use the [%appdomain] to separate the output of the services to different files: <file typ... |
| 02/06/2006 10:02 PM | Log file line number |
| Replies: 3 |
Hi all,
Is there a way to configure the conversionPattern to write the log file line number like below ?
0 : starting application…
1 : the second line of my log file
... |
| 02/02/2006 10:24 PM | ADO.NET Appender and connection pooling |
| Replies: 1 |
Hi,It seems that the ADO.NET appender only ever uses one connection to the database. It opens this connection when the config file is parsed, and keeps it open for the duration of its life.Does anyone see any problems with this being a bottleneck? I searched in the archives and can't find anyone else ever bringing this up. I just wonder if this is a problem under heavy load, because aren't you sin... |
| 02/01/2006 10:47 PM | log4net 1.2.9 beta release date |
| Replies: 1 |
Can anyone shed light on when log4net 1.2.9 beta will be officially released? We would like to use the newer version, but there are concerns around it being labeled a beta version. Any insight would be appreciated.
Anthony Taylor
Staff Engineer
Aspen Technology, Inc.
Suite 1500
2500 CityWest Blvd.
Houston, TX. 77042
281-504-3283
|
| 02/01/2006 6:38 PM | Unhandled exception! |
| Replies: 4 |
/Security Exception/*Description: *The application attempted to perform an operation notallowed by the security policy. To grant this application the requiredpermission please contact your system administrator or change theapplication's trust level in the configuration file.*Exception Details: *System.Security.SecurityException: Request for thepermission of type 'System.... |
| 02/01/2006 3:40 PM | Bug using ColoredConsoleAppender in Windows-Service |
| Replies: 0 |
Hello NG,the ColoredConsoleAppender has a bug when it used in a windows service. TheAppender accepts some logging entrys and then it runs in a deathlock when alogmessage is called ( i.e. Log.Warn("xxx") ).Ok, you will say "Then, dont use the ColoredConsoleAppender in a windowsservice application" but my app can start in console and service mode and ionly want to have one configfile for all. It too... |
| 01/31/2006 1:08 PM | ASP.NET starter help. |
| Replies: 7 |
Hi,I've spent a number of hours trying to get log4net to log something inan ASP.NET project but have not gotten anywhere. Hopefully someone cantell me what's going on here.In the AssemblyInfo.cs file for my main site I have:[assembly: log4net.Config.Repository("SiteCore")][assembly: log4net.Config.XmlConfigurator(ConfigFileExtension="log4net",Watch=true)]In Global.ascx.cs:// Class fieldsprivate st... |
| 01/30/2006 5:51 AM | Compression tool |
| Replies: 4 |
When I use the rolling file appender I get files like this:Example.logExample.log.1Example.log.2006-01-01Example.log.2006-01-01.1Example.log.2006-01-01.2Example.log.2006-01-01.3Example.log.2005-12-06Example.log.2006-12-06.1Now I want to join, and compress the files with a date stamp to savedisk space like this:Example.logExample.log.1Example.log.2006-01-01.gzExample.log.2005-12-06.gzIs it anyone o... |
| 01/28/2006 12:36 AM | Repeat ignores messages |
| Replies: 7 |
Hi all!Can log4net ignore repeated log lines?log.Debug("Hello world");log.Debug("Hello world");log.Debug("Hello world");log.Debug("Hello world");log.Debug("Another message");The log lines above should result in something like this:Hello worldLast message was repeated 3 timesAnother message
--
Best RegardsMorten AndersenDeveloperVianett AS | morten@vianett.no | +47 69 20 69 74 | Skype: mortander... |
| 01/24/2006 8:20 PM | Bug? |
| Replies: 2 |
I use RollingFileAppender to create log files and tail.exe (just like tail in linux) to watch them. When the file is open the rolling brakes. It does not seem to start again before I close tail and restarts my application.
--
Best RegardsMorten AndersenDeveloperVianett AS | morten@vianett.no | +47 69 20 69 74 | Skype: mortander |
| 01/20/2006 8:25 PM | RE: execution takes in 1 minute when enable logging |
| Replies: 4 |
Are you executing the code while the debbuger is attached to the process ?
|
| 01/19/2006 6:24 AM | ADONetAppender Problem |
| Replies: 1 |
> I am trying to log into oracle database and some how its not happening.> Can you please help me out.>> "<appender name="AdoNetAppender_Oracle" type="log4net.Appender.AdoNetAppender">"> "<bufferSize value="128" />"> "<ConnectionType value="System.Data.OracleClient.OracleConnection, System.Data.OracleClient, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5... |
| 01/17/2006 5:06 PM | Extending Log4Net |
| Replies: 4 |
Hi,
I have just started to use the latest version of log4net 1.2.9 and would like to know how best to extend its capabilites to do what i need. We currently have our own logging application which takes an object called LogEntry (containing 5 parameters including a Message field) and makes use of MSMQ and WebService technology.
It is easy enough to write an Appender w... |
| 01/16/2006 9:10 PM | newly created logfiles are locked. Why? |
| Replies: 2 |
I have a class library called taskLogger.cls that loads the config file (aConfigFile.xml) from the specified path. Following are the lines of code in taskLogger constructor. This will create all the log files specified in my config file with zero kb. This class library is a part of TaskProcessor component and taskprocessor component runs as a service in the background on windows 2003 and w... |
| 01/16/2006 6:27 AM | Is there anything resembling a "WebServicesAppender"? |
| Replies: 7 |
I've gotten pretty familiar with the file, smtp, adonet, and eventlogappenders, and have even written my own simple extensions. Now I'm beingasked to make log4net logging happen over the public internet from a .NETWinforms client app, and I'm on unfamiliar ground.The client is a .NET Winforms app that will do some work locally and hit upservers over http via .NET web services for other work, but l... |
| 01/14/2006 2:17 AM | XMLLayout Documents |
| Replies: 0 |
Has log4net-events.dtd been removed from the project? I am unable to locate it in the source tree. If so, what is the recommended method for validating/parsing files produced by this layout? Chris |
| 01/12/2006 2:20 AM | RE: VS 2005 support |
| Replies: 3 |
Do you have a timeframe of when you will be supporting VS 2005?
Dave Poquette Information Systems
Quad/Med LLC
Sussex, Wisconsin 414-566-6889 phone dave.poquette@qg.com www.quadmedical.com www.qg.com |
| 01/10/2006 3:11 PM | log4net question urgent |
| Replies: 1 |
Hi, i am using Log4Net, I dont know why, the log it writing in this format.here, if you notice that the [Header] is on the same line and \r\n is also not working properly, where as the [Footer] is missing,yes the footer tag will appear but when I will write any entry again, can anybody tell me why it is happening.[Header]\r\n2006-01-04 12:50:39,281 [2832] INFO ChangeMobile.Confirm 1 for each Loop2... |
| 01/06/2006 12:29 AM | Using MDC to handle multirequests |
| Replies: 3 |
Hello List,I am currently trying to get my head around using MDC to handle loggingin an environment with multiple simultaneous requests. Another reasonfor using MDC is that I need to use the "%X{MyParameter}" syntax in myconversion pattern.The problem I have is that (by Log4Net design) the MDC parameters areoverwritten by new parameters. As an example, I have three assemblies"Caller", "Funct... |
| 01/04/2006 4:52 PM | Manipulating the configuration programmatically |
| Replies: 1 |
Hi,
I would like to write a simple UI tool above the log4net configuration that will basically allow me to control the level of logging per a given logger or the root itself.
The thing is that I would like to allow this manipulation to take place while my application is up and running.
I'm aware that I can change the file itself and use the "ConfigureAndWatch" API from my app... |
| 01/03/2006 5:19 PM | TraceAppender ignores format string |
| Replies: 0 |
Hi, everybody.I am using a TraceAppender, that in addition to the conversionPattern that I want allways logs the %logger class before writing the log file. This makes my log files unreadable... This behavior was not there in one of the olderreleases of log4net.<appender name="TraceAppender" type="log4net.Appender.TraceAppender" > ... |
| 01/03/2006 5:53 AM | ADONetAppender - can only use IP in connection string? |
| Replies: 3 |
Hi, it seems that we can only use the IP,port of our database in the ADONetAppender connection string (log4net 1.2.8). Is there a limitation that is preventing us from using the database name, or should the database name work as well as IP,port?cheers,Simon. |
| 12/30/2005 10:04 PM | Multiple logs? |
| Replies: 3 |
Hi all, Until now, I used the following code for my log:Namespace Test{ Class Class1 { Private static string appPath = ""; private static ILog log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType ); pr... |
| 12/29/2005 7:34 PM | log4j.properties file for Tomcat windows service |
| Replies: 1 |
Hi,
I have a problem configuring log4j.
I have installed two of the Tomcat versions. One from zip file and other from exe (as a service version).
The log4j configuration of tomcat from zip file is successfully running.
But there is some problem configuring for tomcat from exe. I copied log4j.properities file to WEBINF/classes but there is no any change, the log file I stated in the properties... |
| 12/29/2005 4:47 PM | log4net across Threads and AppDomains |
| Replies: 0 |
Hello.
I’m wondering about the following situation:
I have configured a RollingFileAppender to log in a file logs\host.log and another one (in a second config file) with exactly the same configuration except the file is logs\plugin.log. I’m running the host and configure log4net with the first config file, the host is logging as expected. The host runs in two threads and statem... |
| 12/29/2005 2:31 AM | tag not overriding tag members |
| Replies: 2 |
Hi,
I need help regarding the following problem.I have the following Log4net Configuration file. The <logger name="LoggerProviderService"> section is not overriding the <root> section.
The webservice i am using is taking the root <level value="DEBUG" /> and the root appenders which are console,smtp and RollingLogFileAppender.
I want my webservice to take <... |
| 12/23/2005 9:40 PM | Log4net does not works in production env |
| Replies: 7 |
Hello all,I am facing a strange problem.The problem seems exactly like somebody posted earlier-------------Logging is working fine on my dev machine but when I deploy it doesnot do anything. I copied the whole code on the production machineand tried debugging it, it worked fine, I go the logs.---------http://nagoya.apache.org/eyebrowse/ReadMsg?listName=log4net-user@logging.apache.org&msg... |
| 12/23/2005 3:28 PM | Strange behavior using Log4Net and NUnit |
| Replies: 2 |
Hi,When testing my application from NUnit, with logging set to DEBUG I get the folowing (attached) output in NUnit and logging in the log file.I also include the configuration file.When NOT using NUnit it works fine.The last error (no transaction) is weird because serialization seems to work half (GetData is called, but the deserializing constructor is not).Could this be associated with the Log4ne... |
| 12/21/2005 4:04 PM | BUG? Parent appenders log based on child appender level |
| Replies: 5 |
I've got a requirement where I need one appender to log info level messages to a log file, which I've defined as a RollingFileAppender, and error messages to a mail, which is an appender I've written myself called HtmlSmtpAppender (see my earlier post regarding html format mails). The config entry looks like this: <log4net> <appender ... |
| 12/15/2005 11:31 PM | SmtpAppender configuration error |
| Replies: 7 |
Hello !(I've browsed this list to avoid duplicate threads, but if this problem wasalready announced then forgive me).Let imagine following scenario:1.my app uses smpt appender, which is configured using ConfigureAndWatch.Initially the property smtpHost is set to MyMailServer.net.Some log events occured so some e-mails was sent, what results, thatSmtpMail.SmtpServer is set to MyMailServer.net2.Then... |
| 12/13/2005 6:57 PM | Setting properties on a logging event |
| Replies: 1 |
Is there a user accessible way to set some properties for a single event? I would like to be able to log event as a list of names and values and have these written as separate attributes/elements by the XmlLayout class. I can set the global properties but this seems a bit clumsy for a single event as I have to remove them afterwards.
Thanks
Barney |
| 12/13/2005 4:05 PM | RE: html output |
| Replies: 6 |
I'd go for XML output and do XSLT transformations to HTML
|
| 12/13/2005 3:43 AM | Hierarchical logging...I'm not sure I "get" it |
| Replies: 3 |
and my google fu is not helping either. Is there somewhere anyone canpoint me to get something beyond the paragraph offered in the log4nethomepage to help me grasp what is being talked about? It's touted asone of the big selling points for using log4net and so I feel prettysilly not at least understanding what it's about if not actuallyutilizing it in my code. :)--533777336444244 |
| 12/12/2005 11:12 PM | log4net exception handling |
| Replies: 6 |
Following is the method that logs messages to the log file. Logger is initiliazed correctly before calling this method. If there is any error in LogMessage() method, errors are logged to application event log. What I don't understand is, if the log file that is used for logging messages is currently locked, an exception is not raised in the code below. The code continues to work as i... |
| 12/12/2005 8:26 PM | RollingFileAppender Stops logging in Web Service |
| Replies: 5 |
Hi, I am using Log4Net within a WebService. I have been successfully logging to a file using the RollingFileAppender, however recently the webservice stops logging completly to the file for no apparant reason. The WebService continues to work successfully but no logs are generated. I have read in other threads that by touching the web.config file, this will cause the webservice t... |
| 12/12/2005 7:39 PM | how to handle this error? |
| Replies: 2 |
This error occurs once in a while and I wonder if there is a way to handle it. I turned on log4net internal debugging and this is what I see.
log4net:ERROR [RollingFileAppender] Unable to acquire lock on file C:\Program Files\Mobius\logfiles\log4net\vdrconBOLog.log. The process cannot access the file "C:\Program Files\Mobius\logfiles\log4net\vdrconBOLog.log" because it is being ... |
| 12/09/2005 7:29 AM | Issues with log4net contexts under ASP.Net |
| Replies: 0 |
It's not a bug per-se, but I think it's definitely worth putting
something up onto
http://logging.apache.org/log4net/release/manual/contexts.html
regarding how ThreadContext and LogicalThreadContext are both
completely unsuitable for use within ASP.Net.
Otherwise naive developers (myself previously included) might
accidentally do something like set the ThreadContext up in the
Application_... |
| 12/09/2005 5:39 AM | Can't setup log4net with .NET Compact Framework |
| Replies: 0 |
Hi,I've been trying to setup log4net to work with the .NET CompactFramework, but have had no luck.Here are the details:log4net 1.2.9 betaVisual Studio .NET 2003.NET Framework 1.1.NET Compact Framework 1.0 SP3Smartphone 2003 SDKPocket PC 2003 SDKI'm developing with C# for the Smartphone 2003/Pocket PC 2003 platforms,and decided to try log4net because I wanted console output but consolestatements do... |
| 12/07/2005 9:39 PM | log4net and Microsoft Transactions |
| Replies: 7 |
Has anybody had any problem in log4net with Microsoft transactions? |
| 12/07/2005 2:04 AM | log4net logging level INFO or DEBUG causes the web application to end |
| Replies: 2 |
I have an asp.net web application that uses log4net. I recently upgraded tofrom 1.2.0 to 1.2.9 because I needed to use FileAppender+MinimalLock inorder to access the log files while the application was running. I also madesome other changes to the application and started to get some strangebehavior. The application would suddenly end for no apparent reason and atintermitted intervals. I added more... |
| 12/05/2005 11:03 PM | filtering on message source |
| Replies: 6 |
I need to combine messages from one class with messages of level WARN orabove from other classes. I can easily log the WARN and above messagesbut was wondering on the best way to add in ALL messages from thespecific class. Is the best technique to define a second logger and thenuse LoggerMatchFilter in the appender? Can I avoid having to define asecond logger and use some kind of ClassSource fil... |
| 12/05/2005 7:01 PM | MinimalLock not working |
| Replies: 2 |
Hi All,
I am using log4net v1.1.1.33753. I want to use single log file for all the instances of my application (if any). Thats why I am using following settings in my configuration file but its not working, only first instance of the application is allowing to log messages in the log file none others.
Can anyone tell me whats wrong or what to do?
<?xml version="1.0" encodi... |
| 12/05/2005 1:50 AM | ApacheCon |
| Replies: 0 |
Any log4net'ers attending ApacheCon in San Diego, CA this year? http://www.apachecon.com/I'll be in San Diego Saturday through Thursday.- Ron
|
| 12/01/2005 12:43 AM | Log4net version 1.2.0.30714 |
| Replies: 5 |
Is this a beta version? |
| 11/30/2005 3:48 AM | Trouble with PropertyFilter |
| Replies: 4 |
I'm having trouble making a PropertyFilter work with some custom propertiesof mine, and the archives didn't turn up anything. I'm probably notunderstanding what PropertyFiltering is or am fat-fingering something; helpappreciated.Expected Behavior: a certain FileAppender named 'AssertionException' willonly contain Events with a custom property 'LogEventCategory' set to a valueof 'AssertionHandling'... |
| 11/29/2005 1:43 AM | RE: Specifying a specific folder for log files. |
| Replies: 3 |
You need to escape the back slash. For example:<param name="File" value="..\\Log\\Error.log"/>Chris |
| 11/26/2005 5:02 AM | Programatically changing the logger for NHibernate |
| Replies: 10 |
I had added a configuration that built my loggers in code only and all was well(no xml!). Later though, I found out that NHibernate is doing something bad,logging exceptions with log.Error. These exceptions are handled by the caller,so I really don't want those log calls made at all. No problem, I thought I'dcreate a repository for the NHibernate assembly, setup the appender I want, andthis would ... |
| 11/24/2005 10:13 AM | i want to check out this news |
| Replies: 0 |
i want to check out--JohnnyDJ |
| 11/22/2005 4:52 PM | Log4Net file locking |
| Replies: 7 |
Hi,We wish to port our .NET windows application logging to Log4Net but are facing aproblem. Our application dispays the log file in a rich text box so that theuser can debug himself what all is happening in the application. We plan to userRollingFileAppender so that logs can remain for certain period pf time.However, there is some problem here. When we try reading the log file anddisplay it in the... |
| 11/22/2005 3:41 PM | web.config problem |
| Replies: 3 |
hi all!i have a problem configuring the log4net rollingfileappender. myapplication is structured as followed:web_root+-application main +-bin +-main +- log.txt +- ..... (all the other files) Web.confighere is my Web.config:<?xml version="1.0" encoding="utf-8" ?><configuration> <configSections> <se... |
| 11/21/2005 10:59 AM | copy local? |
| Replies: 0 |
Hi, I just figured that you need to set "copy local" = true when referencingLog4Net library. Is there any way I can use this from GAC and not setting"copy local" = true? Thanks. |
| 11/18/2005 9:49 PM | Re: Checking IsDebugEnabled before calling Debug()? |
| Replies: 6 |
Hi,I was going through the examples and saw this: // Log a debug message. Test if debug is enabled before // attempting to log the message. This is not required but // can make running without logging faster. if (log.IsDebugEnabled) log.Debug("This is a de... |
| 11/17/2005 6:01 AM | Log4Net NewLine Character Problem |
| Replies: 5 |
Hi, I am using the latest version of Log4Net(1.2.9 beta version). I am unable to insert new line characters in the content message of log4net. I am using the following skelton piece of code ----------------------------------------------------------- ... |
| 11/16/2005 8:48 PM | problems with log4net |
| Replies: 3 |
I have included the framework ..
config file look like this
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<log4net>
<appender name="A1" type="log4net.Appender.ConsoleAppender">
<!-- A1 uses... |
| 11/15/2005 10:54 PM | Question about RollingFileAppender output ending in a txt extension? |
| Replies: 0 |
I've tried playing around with my config file wrt log file names, and I can't seem to get what I'm looking for. I am wondering if there is a way to have the output from the RollingFileAppender save all the log files as text files (.txt). I've noticed that if I specify just a date pattern in the DatePattern parameter, the resulting log files I get are named:
Server-2005-11-15 Server-20... |
| 11/15/2005 4:51 PM | RollingFileAppender truncates logfile at midnight |
| Replies: 2 |
I use the RollingFileAppender to write a logfile from a long-lived process.It is configured with static logfile name and to roll by date: <appender name="LogfileAppender" type="log4net.Appender.RollingFileAppender"> &n... |
| 11/15/2005 6:07 AM | Can't log nulls with AdoNetAppender? |
| Replies: 5 |
My client is having me log to a SQL Server database using AdoNetAppender.All is going smoothly except for one thing: I can't seem get NULL valuesinto database columns. Certain of the database columns are of SQL Servertype Int (.NET type Int32) because they are primary key values in othertables and need to participate in joins - but the columns allow nulls;occasionally they aren't present. Whenever... |
| 11/15/2005 12:05 AM | .NET 2.0 version of Log4Net |
| Replies: 0 |
When will a version of Log4Net compiled for the .NET 2.0 Framework beavailable for download?Thanks, Joe_________________________________________________________________The new MSN Search Toolbar now includes Desktop search!http://toolbar.msn.co.uk/ |
| 11/11/2005 9:35 PM | Logging in CF on pocket pc 2003 |
| Replies: 2 |
Hello all,How do I log application / exception messages on pocket pc application(developed using .net cf)? Opening a file and writing to it? Or can I uselog4net? Has anyone used log4net or anything similar to log messages?Any other thoughts?Thanks in advance. |
| 11/11/2005 12:31 AM | log4net not logging in web services |
| Replies: 2 |
Hello,I am able to log messages on one pc (XP prof) from a .net web service without any issues to any directory (provided I give permissions ASPNET user).But when I move the same code to another pc (XP prof), it does not evencreate the log file (either in the Inetpub\wwwroot\ or any otherdirecotry).I gave full control permissions to ASPNET and NETWORKSERVICES accounts tothe directory where the log... |
| 11/10/2005 11:08 PM | SmtpAppender fails to send - System.Web.HttpException: Could not access 'CDO.Message' object |
| Replies: 1 |
Hi all-I've noticed the SmtpAppender occasionally fails to send emails. I've run it with log4net debugging enabled and got this from the logs:log4net: Hierarchy: Shutdown called on Hierarchy [log4net-default-repository]log4net:ERROR [SmtpAppender] Error occurred while sending e-mail notification.System.Web.HttpException: Could not access 'CDO.Message' object. ---> System.Reflection.Target... |
| 11/10/2005 2:26 AM | SmtpAppender loses lines |
| Replies: 1 |
Hi-I am running into a problem with the SmtpAppender losing lines when being used to send large volumes.I have written a sample C# .Net program demonstrating the problem, along with the log4net internal debugging output, I can mail this if required (mailing list doesn't accept attachments).The demo tries to write 1000 lines of 2000 characters each to two appenders (Trace and SmtpAppender). A... |
| 11/09/2005 9:34 PM | Appender configuration inheritance |
| Replies: 1 |
Hello.Is it possible to inherit from another appender configuration in the log4netconfiguration file? We use some appenders of same type and with sameconfiguration, excepting one or two properites and so it would be nice ifthere is an simple inheritance mechanism to shorten the xml config code.I'll give you an example what the xml should look like:<appender name="RollingLogFileAppenderBase"type... |
| 11/09/2005 9:29 PM | RollingFileAppender: log files with constant extension and composite name |
| Replies: 1 |
I'd like current messages to always be logged into a file with the same name (e.g., mylogs.log). When a file hits a maximum size I'd like to have the file renamed and have future logs go into a new file with the same name as before (i.e., mylogs.log). The old file would be renamed to a name that includes a sequence number and date (e.g., mylogs20051109.2.log for today's second log file). It ... |
| 11/08/2005 6:23 PM | PatternLayout - add time increment |
| Replies: 5 |
Hi all, I looked for solution how I could insert to log file an timeincrement consecutive records. As I studied the PatternLayout forlog4net, found no possibility to achieve it. Is there anyone who solved it or it is not possible? Thanks for any response, bye Jaroslav Urban... |
| 11/08/2005 12:55 PM | Log4Net for Oracle 8i |
| Replies: 3 |
Hi All,I am franson. I am new to Log4Net for error log. Iwant log my error in oracle 8i. I got some examplefrom the following url.http://logging.apache.org/log4net/release/config-examples.html#adonetappender-o8I did not get any error message from example. And sametime I cannot insert my error into the database.Please help me to insert error message into oracle 8idatabase.Thanks & regards,Frans... |
| 11/06/2005 8:46 PM | Remoting appender in a Remoting application |
| Replies: 1 |
Hi,Has anyone any idea to resolve this problem,I tried to use a remoting appender like this :<appender name="RemotingAppender" type="log4net.Appender.RemotingAppender" > <sink value="tcp://localhost:8085/LoggingSink" /> <lossy value="false" /> <bufferSize value="95" />... |
| 11/05/2005 12:39 PM | Problem to compile log4net 1.2.9 |
| Replies: 3 |
Hello,I have to compile log4net 1.2.9 to make him use the 2.0.0.0 version ofSystem.Data. I use NAnt and lib/mono/2.0/gmcs.exe and Mono 1.1.9.2/LinuxI got the following error:compile-mono-1.0: [csc] Compiling 201 files to'.../log4net/bin/mono/1.0/debug/log4net.dll'." [csc] error CS0535:`log4net.Config.Log4NetConfigurationSectionHandler' do... |
| 11/04/2005 11:52 PM | What do I need to do to get rid of this error? Please help |
| Replies: 22 |
log4net: RollingFileAppender: Searched for existing files in [C:\Program Files\Mobius\contenuity\LogFiles]
log4net: RollingFileAppender: curSizeRollBackups starts at [0]
log4net: FileAppender: Opening file for writing [C:\Program Files\Mobius\contenuity\LogFiles\vdrconBOLog.txt] append [True]
log4net:ERROR [RollingFileAppender] Unable to acquire lock on file C:\Program Files\Mobius\contenuity... |
| 11/04/2005 3:48 PM | different object instances |
| Replies: 2 |
hi all,is it possible to distinguish different instances of a class (written inc#) in the log-output?in the old vb6 days, i could use the "ObjPtr"-function to get a "uniquevalue" for each instance. in c# i could use the "GetHashCode"-function,but the docs say i'm not supposed to use it for that. how can i do thatwithout adding specific code to the class myself? all i want to see iswhich log-entry ... |
| 11/03/2005 7:37 AM | How to get the log level and other config info programmatically |
| Replies: 5 |
How do I get the current log level and other config info programmatically? The ILogger interface does not define any methods or properties to do this.
More specifically, if I have a logger like this:
private static readonly ILog logger = LogManager.getLogger();
How do I find out the log level of this logger (as set in the config file) and also the log level of the roo... |
| 11/03/2005 1:41 AM | High occurrence errors |
| Replies: 3 |
Hello again to the log4net group!
I am currently using L4N to log all the errors in a real time data acquisition application and have come across a bit of a problem. There are certain places in the application where exceptions occur at a very high rate when a problem does arise and the log files generated become huge in a matter of minutes (or in one case, seconds). The specific places that I ha... |
| 11/02/2005 3:47 AM | newbie - log4net deletes my config file! |
| Replies: 2 |
I'm a .net and log4net newbie working thru the tutorial at http://www.codeproject.com/csharp/log4net_intro.asp First example, logging to console with no config file, works fine. 2nd example, using a small config file, I see two problems. The main problem is that my config file is deleted from the system when I run the project. Here is the complete code of the project: using System; using log... |
| 10/28/2005 1:44 AM | log files get reset at 12:00 noon every day |
| Replies: 5 |
Hi,This is totally weird. Every day at 12:00 noon the log files from our application get reset. If I check them in the morning, there are entries starting in the night, there's entries throughout the morning, and then exactly at noon log4net seems to delete the file and recreate it, so all the entries from midnight until noon are deleted.This is only happening in our recently deployed QA and produ... |
| 10/28/2005 12:59 AM | internal debugging. |
| Replies: 5 |
Is this how I enable internal debugging via code?
log4net.Util.LogLog.InternalDebugging = true;
Also, where are these log messages written to? Is it written to text file and where is this file located?
If not, how can I set it up to write all the messages to text file?
Finally, is this quote true?
"Log4net is designed to not throw exceptions. Your application... |
| 10/27/2005 4:01 PM | Controlling the date format of the logged events |
| Replies: 2 |
In my application I need to be able to store my log messages date format as UTC. It seems that the default used by log4net is local time format. Is there a way to control the date time format (preferably through configuration)?
Any help would be greatly appreciated.
Ofri
|
| 10/25/2005 7:01 AM | DebugView doesn't capture when using Remote Desktop |
| Replies: 1 |
Hi,I can use DebugView locally and it always works. However when I use Remote Desktop to some of our servers and try to run it, it doesn't seem to capture anything. I'm running it locally on the server I'm remoting into, but no luck. I do have debugging turned on in both the web.config and log4net.config files.Has anyone used DebugView successfully on a remote server with log4net?Thanks,Simon. |
| 10/25/2005 6:56 AM | HostName property sometimes empty |
| Replies: 2 |
Hi,I'm having a problem where I'm trying to log the HostName property (like this: %P{log4net:HostName}) and on some servers it seems to work and on others it doesn't. I'm using v1.2.8 and trying to log to both text files and SQL Server. In both scenarios I have some cases where it works and some where it doesn't.Has anyone else had this problem of the HostName property being empty??Thanks,Simon. |
| 10/25/2005 2:31 AM | DbType for CLOB column using AdoNetAppender |
| Replies: 0 |
Hi,
I have sent the following email but used a wrong subject (by replying). I'm resending it.
Thanks.
----------------------------------------------------
Hi,
I'm using AdoNetAppender to log to an Oracle 10g database. There is a CLOB column used to store diagnosis message with stack trace if there is any. The following config is used for this column.
<p... |
| 10/24/2005 3:43 AM | Log4Net Reports |
| Replies: 3 |
Hi,I know the primary purpose of Log4Net is logging capability in yourapplication. However, I'm wondering if it's also used/recommended forReporting?I've heard talk of people using Log4Net to generate logging information thatthey intend to use for creating reports. Is this a recommended strategy? Or should application reporting be kept separate from Log4Net entries?From what I und... |
| 10/22/2005 3:59 AM | Log4net seems to hang when starting up windows service |
| Replies: 6 |
Hi Everyone,We're using log4net 1.2.9 beta to log output from a Windows service.We're experiencing a problem where it looks like log4net is hangingduring start-up, causing the service to timeout (we get an error messagesaying "Error 1053: The service did not respond to the start or controlrequest in a timely fashion"). It's especially odd since it only seemsto happen every other time we try ... |
| 10/19/2005 6:41 AM | Custom global param |
| Replies: 1 |
Hi all,Does the log4net framework support custom parameters that I can retrieve incode? Basically, I would like to set a property called "VERBOSITY" in thelog4net config file that I could retrieve in code and use to manipulate mymessages that get sent to the logger. When this value is "ON" I wouldappend stack trace info to messages, regardless of the log level I will logthe message at.... |
| 10/12/2005 3:31 AM | RemotingServer hangs? |
| Replies: 1 |
Hi,I'm using a .NET Remoting solution which uses the RemotingServer NT service, included as example code with the distribution. I have a custom .NET Remoting appender which sends events asynchronously to the RemotingServer (in 1.2.8 the RemotingAppender was not asynchronous, so I wrote my own).The other day the RemotingServer service stopped responding and would not log anything until I restarted ... |
| 10/12/2005 1:49 AM | Dynamically add Souce and Category to EventLog |
| Replies: 4 |
Hello There,
I am using the most recent version of Log4Net. I need to be able to add source and category information on a per message basis. I am able to successfully add this in the SQL server as I can utilize MDC properties.
Example:
MDC.Set("category", category);
Can I do something similar to EventLogAppender?
Thanks in advance.
Mohit
|
| 10/11/2005 4:42 AM | Inability to use EventLogAppender with ASPNET |
| Replies: 6 |
With log4net internal debugging turned on, an attempt to create an EventLogAppender for a web application is failing:[3616] log4net: XmlHierarchyConfigurator: Setting Property [Layout] to object [log4net.Layout.PatternLayout] [3616] log4net: XmlHierarchyConfigurator: Setting Property [LogName] to String value [Application] [3616] log4net:ERROR XmlHierarchyConfigurator: Could not create Appender [E... |
| 10/11/2005 4:15 AM | Capture Log4NET Internal Debugging |
| Replies: 1 |
Is there a good way to capture the internal Log4NET debugging for a web site or web service? I would like the ability to capture the debugging so that I might better figure out why logging is not working.
For my app, logging is working great now, but I would like to capture the internal debugging output just incase something fails in the future.
Thanks! |
| 10/11/2005 2:10 AM | DefaultDomain / Repository Question |
| Replies: 1 |
Hi,What would be considered the equal of the following line in 1.2.9?[assembly: log4net.Config.Domain(UseDefaultDomain=true)]Thanks,Mladen |
| 10/10/2005 10:19 PM | Forcing flush before killing a process |
| Replies: 1 |
Hi,is there some way to flush all the logs before killing the process ? I'm using Environment.Exit() for last chance application exit (when everything else has been tried).I'd like to record the fact that I had to kill the process. Is it doable ?regardsThibaut |
| 10/08/2005 2:55 AM | different levels for appenders |
| Replies: 1 |
Hello,I would like to know if different appenders could havedifferent levels of logging.In my project I have a RollingLogFile appender and anEventLog appender; I would like to log all messages(level=ALL) in the file and only ERROR messages in theeventLog, is it possible ?ThanksJC __________________________________Y... |
| 10/04/2005 12:39 PM | TypeInitializationException was unhandled |
| Replies: 9 |
HiI am getting following error in log4.netThe exact error message and stack trace:System.TypeInitializationException was unhandled Message="The type initializer for'log4net.Core.LoggerManager' threw an exception." Source="log4net" TypeName="log4net.Core.LoggerManager" StackTrace: atlog4net.Core.LoggerManager.GetRepository(AssemblyrepositoryAssembly... |
| 10/02/2005 5:32 AM | Anyone want to handle posting a log4j -> log4net wrapper on sourceforge? |
| Replies: 0 |
Hi;
I am working on some java code that we are porting to J#. Our goal is to have a common code base so we want to be able to call the log4j classes that we have throughout our code.
However, we do not want to port log4j as log4net exists, and is widely used in the .net world. So I am creating a wrapper that is the public log4j classes that underneath calls log4net. I think thi... |
| 09/29/2005 9:09 PM | Negate a filter |
| Replies: 1 |
HiIs it possible to negate a filter. I.e. instead og letting matched througt,it should stop matched from getting through.Lets say I want to remove lines containing the word SQL from my log, how doI setup a filter that will let all lines through, except lines containingthe word SQL??TIASøren |
| 09/28/2005 3:02 AM | LOG4NET - SMTP Appender Not Working |
| Replies: 13 |
Hi, I am a LOG4NET configuration file to log information into a log file and send email to SMTP server. Logging information is successfully getting logged into the log file but email via SMTP Host is not working. Is there anyway to debug why email delivery is not working? I have checked SMTP server, looks like LOG4Net is not even hitting the server, there is no email waiting to be delivered.
&n... |
| 09/28/2005 12:21 AM | Compact Framework 1.0 MsmqAppender |
| Replies: 3 |
Hi all,
I am using the MsmqAppender on the Full Framework without problems. Recently had to port it to the Compact Framework. Up until this point we have used Odyssey.CFCom to bridge the managed code to COM gap (since the Messaging namespace does not exist in the 1.0 CF) and that is what I used in the MsmqAppender. This works. However; there seems to be a memory leak.&nb... |
| 09/24/2005 7:57 AM | DB logger doesn't log complete exceptions! |
| Replies: 2 |
Basically, my exceptions get logged only partially, like this:ICSharpCode.SharpZipLib.SharpZipBaseException: Unexpected EOF atICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputBuffer.Fill() atICSharpCode.SharpZipLib.Zip.Compression.Streams.InflaterInputBuffer.ReadLeByte() at ICSharpCode.SharpI have my DB set up with... |
| 09/24/2005 3:55 AM | How to log EventID with EventLogAppender? |
| Replies: 11 |
I'm logging with EventLogAppender, and setting the EventSource field in theApplication Log using ApplicationName property.But I would like to log my own EventIds as well. Is there a way to do thiswith log4net? I'm not talking about putting something in the message text,but setting the actual eventID field in the log. I can't see a way. What amI missing?WILLIAM BARNUMb.barnum@comcast.net |
| 09/24/2005 3:42 AM | (small) Registry Garbage Coliection Issue With EventLogAppender? |
| Replies: 0 |
This is not a bug exactly . more like a garbage collection issue I noticethat has to do with EventLogAppender. And it's certainly a small issue, but.I notice that when I execute EventLogAppender with a security account thatdoesn't have enough authority to set up its own EventSource in the EventLog,log4net creates its own event sources inHKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog... |
| 09/23/2005 11:40 PM | TCP Appender |
| Replies: 6 |
Hi there,First of all I have to say that Log4Net is the best logging library I have ever seen. Our company evaluated between 5 and 10 logging apis, some of them were even commercial ones. But Log4Net really kicks ass! :-)For our company I have written a log viewer that listens on UDP. This tool works just fine but as you guys know UDP has one major problem: Sometimes messages are just "eaten", som... |
| 09/23/2005 5:08 PM | how can i add my custom infomaition |
| Replies: 3 |
Hi, When I using log4net's AdoAppender,I have a problem, because thelog4net framework default provide logger,logtime,logLevel,message,etc,but Iwant to adds extra information like the username, department, etc.so whatcan I do? I don’t know how to implement it .can you help me ? thanks verymuch. |
| 09/23/2005 1:47 AM | How to pass integrated security credentials to AdoNetAppender from ASP.NET? |
| Replies: 23 |
I'm successfully logging to a SQL Server table using stored procs and my owncontext information - the whole 9 yards. Works great with SQL Serversecurity; chokes with 'integrated security=SSPI', etc. I get the followingerror msg:log4net:ERROR [AdoNetAppender] Could not open database connection[workstation id=BBARNUMXP;packet size=4096;integrated security=SSPI;datasource=BMT00002;persist security in... |
| 09/22/2005 6:21 PM | Logging based on userID |
| Replies: 2 |
Hi,
I know I have asked this question before in a long distant past and saved the response for when I had more time. Now that I have, I cannot find the response. Typical.
Anyway, I have written an extension to the log4net framework to add a 'userID' field. This works great. What I would like to do now (or, to be precise, what my Support team would like to do now) is be able to sw... |
| 09/21/2005 8:53 PM | Custom Layout and .Net Compact Framework |
| Replies: 1 |
Hi all,
I have a custom layout in a separate assembly (log4net.Ext.GSI.dll - namespace is log4net.Ext.GSI). I have this running correctly on the full framework. Now that I have ported it to the Compact Framework I am getting some errors:
"log4net:ERROR XmlHierarchyConfigurator: Failed to find type [log4net.Ext.GSI.GSIEventLayout, log4net.Ext.GSI]"
"System.TypeLoadExc... |
| 09/21/2005 10:30 AM | SmtpAppender buffer flush (to mail) on shutdown. |
| Replies: 4 |
Howdy folks,
I hope this isn’t an FAQ, but I couldn’t find the answer in mailing list archives or in the documentation.
I have an SmtpAppender pretty much configured as in the example:
http://logging.apache.org/log4net/release/config-examples.html#smtpappender
It is running inside my webapp (configured in the web.config) and works wonderfully, e-mailing... |
| 09/20/2005 2:20 AM | FW: Microsoft Event Registration Confirmation |
| Replies: 0 |
Not sure whether or not you saw this message from last Tuesday.Jon-----Original Message-----From: Jon Finley [mailto:jdf@gksys.com]Sent: Tuesday, September 13, 2005 10:35 AMTo: 'Lynn Richardson'Subject: RE: Microsoft Event Registration ConfirmationDid you want me at this presentation for a particular reason? Asking asthere are two other tracks in which I am more interested. Don't... |
| 09/19/2005 8:56 PM | Including datetime stamp in the log messages. |
| Replies: 15 |
I'm using a fileappender and logging messages to a text file.
My Fileappender and PatternLayout are set like this...
log4net.Appender.FileAppender oFileAppender = new log4net.Appender.FileAppender();
log4net.Layout.PatternLayout oPatternLayout = new log4net.Layout.PatternLayout();
oPatternLayout.Header = "[Begin]\r\n";
oPatternLayout.Footer = "[End]\r\n\r\n";
oPatte... |
| 09/19/2005 3:25 PM | Initializing log4net in code |
| Replies: 1 |
Hi,Is is possible to initialize log4net within code? I have been a log4j fan for a few years and have been initializing the loggers within code but the log4net API is quite different than that of log4j.Best regards,Ivo Limmen |
| 09/17/2005 2:21 AM | Trying to write a J# log wrapper - mostly there |
| Replies: 9 |
Hi;
I am writing a J# wrapper around log4net. I am doing this by implementing the public classes in log4j using it’s package/names so my java code is common source between java and J#.
I have it working except it uses the file name & line number from my Logger.jsl instead of the app that calls my logger.
I can’t inherit from LoggerWrapperImpl because that is a C# c... |
| 09/17/2005 12:21 AM | Asking again: log4net and .net 2.0 |
| Replies: 2 |
Hi;
For .net 2.0, should I use the .net 1.1 dll?
Thanks – dave
|
| 09/16/2005 8:41 PM | Set Appender properties at run time? |
| Replies: 2 |
Hi all,
I have an MsmqAppender and would like to set the queueName property (to which the message should be sent) at runtime. Google turns up a few links that indicate that this is possible (generically). Does anyone have a code snipped that does something like this that you would be willing to share or point me to a link/sample?
Thanks much!
Jon |
| 09/16/2005 2:14 PM | Dynamically Setting File Name in FileAppender |
| Replies: 1 |
I am using FileAppender and want todynamically set the path and name of the logging fileaccording the windows environment variables.So can you tell me whether it can be solved bythe configuration file, or, must i configurate it programmatically?(You know that i have made a lot of settings in the config file,and i won't be happy to embed all of them in my code)Thanks.Wesky |
| 09/16/2005 11:08 AM | log4j jsl wrapper for log4net |
| Replies: 1 |
Hi;
I have a ton of java code that we are building under J# - but we are trying to have a single code base (ie no changes in the source).
Is there a J# log4j that just calls down to log4net?
Thanks – dave
|
| 09/16/2005 11:04 AM | Calling log4net from J# |
| Replies: 1 |
Hi;
I’m able to call log4net from J#. But how should I get my Ilog object? There is no Type attribute in J#.
This works:
private static log4net.ILog log = log4net.LogManager.GetLogger("Program");
But I would like something like:
private static log4net.ILog log = log4net.LogManager.GetLogger(Program.class);
Thanks – dave
|
| 09/16/2005 11:02 AM | log4net and .net 2.0 |
| Replies: 0 |
Hi;
For .net 2.0, should I use the .net 1.1 dll?
Thanks – dave
|
| 09/16/2005 4:12 AM | LayoutSkeleton Help |
| Replies: 10 |
Hi,I have a very simple Layout based on LayoutSkeleton that generates XML using the LoggingEvent values. However; the exception text always prints at the end of the XML. Is there a way to turn this off?My Format routine is as follows: public override void Format(TextWriter writer, LoggingEvent loggingE... |
| 09/14/2005 3:21 PM | Fwd: SmtpAppender's |
| Replies: 1 |
You can try something like this : <appender name="SmtpAppender" type="log4net.Appender.SmtpAppender"> <to value="*****" /> <from value="****" /> <subject value="***" />&nb... |
| 09/14/2005 10:06 AM | MsmqAppender Help |
| Replies: 1 |
Hi all,
I am trying to implement the MsmqAppender but am not having any luck. I haven't seen much written about this appender (relatively new) but am wondering if there are any links available to help set it up? Has anyone used it successfully?
My general problem is that nothing happens. The other appenders setup in my test app work as expected but nothing shows... |
| 09/13/2005 11:58 PM | log4net and IIS Application Pool |
| Replies: 4 |
Hi all! Sorry if this has been discussed before, I'mnew to this user group and don't know how to search asof yet.We are using log4net for logging (go figure) and havea problem every other day. We've narrowed the problemdown to when the worker processes are recycled. Everyother day logging works. Logging starts working on arecycle, and then 24 hours later when we recycle aga... |
| 09/11/2005 2:05 AM | RE: Threshold vs. Filter vs. Evaluator |
| Replies: 0 |
> Nicko, what is the difference between threshold and evaluator?
>
> <evaluator type="log4net.Core.LevelEvaluator">
> <threshold value="ERROR"/>
> </evaluator>
>
> <threshold value="ERROR" />
>
> Does one discard messages sooner than the other?
The threshold is differen... |
| 09/09/2005 9:14 PM | Internal debugging |
| Replies: 9 |
The code attached below is just not working. What is wrong? All I'm trying to do is, enable the internal debugging and write the message to log4netInternalDebugging.txt file. When I run this code, the file is getting created but no messages are getting logged. Please help
public class myErrorHandler
{
&nb... |
| 09/09/2005 9:09 PM | SmtpAppender and EventLogAppender |
| Replies: 2 |
Hello,I'm doing a windows service which uses a SmtpAppender and an EventLogAppender. The EventLogAppender logs all messages which level is greater or equal to DEBUG, the SmtpAppender all messages which level is greater or equal to ERROR. Now if I try this :ILog logger = LogManager.GetLogger(this.GetType());logger.Info("Info 1");logger.Info("Info 2");logger.Error("ERROR !!!!!!!");I receive a mail m... |
| 09/07/2005 11:41 PM | File or assembly name log4net, or one of its dependencies, was not found. |
| Replies: 2 |
This error message is literally driving me insane. L
I'm calling a .net assembly (ErrorHandler.tlb) from my Visual Basic 6.0 component (called busContent.dll) and the .net assembly references log4net. If I instantiate busContent.dll (which in turn calls ErrorHandler) thro my sample exe application, errorhandler is instantiated and few test messages are written to a text file. However, i... |
| 09/07/2005 9:24 AM | Windows Event Log and ASP.NET |
| Replies: 4 |
All,
I can’t seem to find the right information on this one.
First off here my web.config entry for 1.2.9
<log4net>
<appender name="TEST" type="log4net.Appender.EventLogAppender" >
... |
| 09/03/2005 7:34 AM | RemotingAppender Example |
| Replies: 1 |
I'm trying to setup RemotingAppender in a config file, and trying to log from multiple AppDomains. But i could not get this to work. Only the primary AppDomains logging goes through to the Sink setup using RemoteLoggingServerPlugin. I'm using LogFileAppender in the sink to log the buffered events.
Is there anything special which i need to take care of when doing this?
Client's ... |
| 09/03/2005 6:59 AM | Configurable configuration file location |
| Replies: 3 |
Is there any way to specify the configuration file log4net should use via a configuration file? For example, let’s say I have three different applications that all want to use the same log4net configuration. Is it possible to set a value in each application’s app.config file that log4net would use as the path to its configuration file? Or, would it be up to each application to ... |
| 09/03/2005 5:42 AM | custom logging level |
| Replies: 7 |
Hi, I want to add a new custom logging level, called ACTIVITY, to record user activity. It can have the same level as INFO, but it must have its own name so that it's easily distinguishable and so I can record ACTIVITY events to a separate log file.Since the log4net Level class is sealed, I cannot override it in my log4netExtensions project. Therefore, in my LogExtImpl class where I implement vari... |
| 09/03/2005 5:11 AM | Fallback |
| Replies: 1 |
Is there a way to setup log4net to do fallback logging? I only really ever want to write to the database log. However, in case of an error writing to the database, I want the connection error *and* the original error written to the local event log. Should that fail, I want all three (database connection error, error writing to the event log and the original error) written to a local text file an... |
| 09/03/2005 12:06 AM | Slow Performance |
| Replies: 1 |
I have an application that does some database lookups and writes somereports based on the information. I'm using log4net as the loggingmechanism. I have a log4net XML config file where I'm setting upappender, log levels, etc.<log4net> <appender name="FileAppender" type="log4net.Appender.FileAppender"> <file value="debug.log" />  ... |
| 09/02/2005 9:40 PM | Strong name and Log4net |
| Replies: 6 |
Is there a strong name for log4net? If so, what is it? If there isn't one, can we create one?
Ramaa Davanagere
|
| 09/02/2005 8:42 PM | COM and VisualBasic 6.0 and log4net |
| Replies: 8 |
Has anybody been able to use log4net successfully in a Visual Basic 6.0 application thro' COM interop? If so, please post your good. I'm in desperate need of help.
Ramaa Davanagere |
| 09/02/2005 7:49 PM | What log level to use? |
| Replies: 2 |
Hi thereAre there any recommendations or general guidelines for when to use whatlogging level? I never know when to use log.Debug("blah") vslog.Info("blah") or ERROR vs FATAL for example.Thanks,Peter |
| 09/02/2005 5:58 PM | inheritance of appenders from Parent |
| Replies: 4 |
Hi
I am facing a problem in inheritance of appenders from Parent.
version of Log4net used: incubating-log4net-1.2.9-beta ; Platform: Windows
Test: Test if logger a.b inherits its appender from a.
static void Main(string[] args) { ... |
| 09/02/2005 3:13 AM | Logging Exceptions Through a Base Page |
| Replies: 5 |
Hello,I suspect this will be an easy one for you experts out there, but Ihaven't been able to figure it out at this point.I have a web application utilizing Log4Net. I am trying to figure outthe best way to capture and log unhandled exceptions in my app. I havetwo major requirements:1: I don't want to have to write the same repetitive code in each newpage.2: I want the Logg... |
| 09/01/2005 3:16 AM | Transactions and AdoNetAppender |
| Replies: 10 |
I’m having a problem using AdoNetAppender without transactions. I have a .NET class that derives from ServicedComponent. This class is used as a Queued Component. Everything about the Queued Component seems to be working as expected. The class is marked with the [Transaction(TransactionOption.Required)] attribute. In the method, let’s call it MethodA, some logic is ... |
| 08/30/2005 9:09 PM | Rolling Based on Size not working |
| Replies: 3 |
hiI am facing the following problem while using RollingFileAppender:version of Log4net used: incubating-log4net-1.2.9-beta ; Platform: WindowsFollowing is the code which I am running:class TestRollingFileAppender { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main(string[] args) { ... |
| 08/30/2005 12:11 AM | Problem using log4net in C++ code. |
| Replies: 0 |
Hi, We have a problem using log4net in our legacy C++ code. We wrap the log4net in a C# dll and use it in our product. It works well in our C# code. However in a piece that is converted from c++ 6.0 and compiled in .Net, XmlConfigurator.Configure() causes AfxOLEInit() fails. Could anyone know what the problem is here? Thanks. Ping XieCACI4831 Walden LaneLanham, MD 20706pxie@caci.com(30... |
| 08/26/2005 9:01 PM | Logs missing characters |
| Replies: 1 |
Hello All,
I seem to be having a small problem with some characters, generally at the beginning of words, being left out in my log messages. I'm using a RollingFileAppenderI am using version 1.2.0.30714 of the log4net assembly. Thanks in advance for any advice.
Ryan
|
| 08/26/2005 7:13 AM | Remoting architecture |
| Replies: 3 |
Dear all, I have a question of a general kind:How do you use log4net in a system with an architecture that involves remoting?Consider, for example, an enterprise system consisting of a webserver W (in the companys DMZ), anapplication server A (on the inside) with business logic components that connects to a database D.Sometimes the business logic components need to call components on a server T th... |
| 08/26/2005 6:55 AM | support for Mono |
| Replies: 5 |
Hello,Log4net works great for me with .Net 1.1. But the time stam doesn't makesense wit Mono 1.1/Linux:1031 INFO [-1210304288]1045 WARN [-1210304288]My config look like:<log4net> <!-- Print messages on the console --> <appender name="Console" type="log4net.Appender.ConsoleAppender">&nb... |
| 08/25/2005 10:43 PM | Change logging level with a trigger |
| Replies: 7 |
We've been trying to get a certain type of logging working with no luck.We only want to log info messages and above, but if a warning or aboveis encountered, we want it to output the last x number of messages. Thebuffered file appender looks like it almost does this, but not quite.We've also been able to log all messages, but send an email on errormessages with the buffer.Does someone have a... |
| 08/25/2005 8:07 AM | Wrapping Log4Net with a Facade - How to get the correct Location Information |
| Replies: 3 |
We are wrapping Log4Net with a home grown Facade along the lines ofsl4j. We are doing this basically for two reasons: to swap theunderlying logger (for e.g. replacing log4net with something else) andto provide additional functionality at the Facade level (for example,enforcing size limits for log messages, logging additional infodepending on the level, for e.g COM+ context info, etc). Everything i... |
| 08/25/2005 5:17 AM | Enumerating Context properties. |
| Replies: 1 |
Friends,
When using 1.2.8,
I created a custom Layout that enumerated the entries of the MappedContext exposed by a LoggingEvent:
// Append the MDC values if any exist if(loggingEvent.MappedContext != null && loggingEvent.MappedContext.Count > 0) { foreach(DictionaryEntry entry in loggingEvent.MappedContext) { &n... |
| 08/25/2005 2:12 AM | I searched the archives and didn't see it jump out at me. I apologize if I missed anything but here goes: |
| Replies: 3 |
I searched the archives and didn't see it jump out at me. I apologize if I missed anything but here goes:I have an ASP.NET app that will not log. I am using version1.1.4322 on an XP pentium IV Dell. Upgrading versions right now isn't an option for me. I have in the web config file these entries:<configSections> <section nam... |
| 08/24/2005 12:49 PM | How to enforce certain things in log messages while still giving the flexibility to add more things |
| Replies: 2 |
I have kind of an unusual requirement here...let me explain it. While we want the extreme flexibility that Log4Net provides, we also want to make sure certain things always get logged with every log message. Basically, with each log message, we want to make sure certain things always get logged, for example: Date, Time, App Name, Class Name, Method Name, Line Number and ThreadId along wi... |
| 08/24/2005 1:40 AM | log4net.Plugins |
| Replies: 1 |
Can plugins be added via the config file?Are plugins processed before or after the other elements of the configfile have been processed? Is it possible for a plugin to hook into the"pre-initialize Appender" code somehow (i.e. call the appender'sconstructor, pass it to the plugin, then assign the appender'sproperties)?I couldn't find any tests in: /logging-log4net/tests/src/or on the website. ... |
| 08/24/2005 12:09 AM | intermittent appender failures |
| Replies: 4 |
Occasionally, an appender stops appending. This problem is fixed simply by re-saving the config file with no changes.
I've experienced this with the SMTP appender and rolling file appender.
I am using log4net version 1.2.0.30714.
Below is my config file. I am using a console application, MS .NET framework version 1.1.4322.573 Thanks, Michael(michaelr@mcm.com) <log4net debug="tr... |
| 08/23/2005 11:40 PM | Configure Log4net from code at RunTime |
| Replies: 1 |
Hi, I need to add a child to the root category of logging at runtime.I configure log4net at the startup of my application with the app.config file.After I need to add some category with differents appenders.I tried with this code, but it doesn't work :Hierarchy hierarchy = (Hierarchy)LogManager.GetRepository();Logger rootLogger = hierarchy.Root; &nbs... |
| 08/23/2005 5:24 AM | How do you stop watching a configuration file? |
| Replies: 1 |
I am using log4net to log an application that has multiple clients.Each client by default is using a single configuration file. I amtrying to change the configuration file that a particular client isusing at runtime. This is so I can set the logging level to a low levelwithout affecting the runtime performance of the other clients and toprevent someone from accidentally turning l... |
| 08/23/2005 1:09 AM | How do I turn on the debug log for log4net? |
| Replies: 1 |
Hi,
Our log4net loggers aren't working and I don't understand why. They just stop logging and when I change my log4net.config file they sometimes just print the start log and end log lines and don't log anything else. I've gone through the XML files up and down and I don't understand what's going on.
I'd like to turn on the debug so I can look at log4net's own logs an... |
| 08/22/2005 7:14 PM | Flushing? |
| Replies: 8 |
I seem to be getting irregular behaviour from my appender (footer notappearing etc.). I suspect the stream is not being flushed properly. Isthere any way i can force this?If another explanation is possible, please do say.CJ |
| 08/22/2005 4:10 PM | Log4net can't access web.config on remote share |
| Replies: 0 |
Dear all,here are the situation1. Server A (network share) resides asp.net: \\192.168.11.111\ASPNET_APP2. Server B (IIS 6.0) create virtual directory pointed to\\192.168.11.111\ASPNET_APP3. enable internal debug for log4net and capture the message via DebugView.4. Log4net v1.2.9 and .NET 1.15. Then I try to request one asp.net page for instance:http://192.168.11.150/ASPNETAPP/abc.aspx. The page do... |
| 08/22/2005 1:12 PM | Please help... Log4net error when accessing 'web.config' on remote share... |
| Replies: 3 |
Dear all,here are the asp.net application that I setup:1. Server A (as network share resource) resides all the asp and asp.netapps. Including \bin, web.config, etc. Let say the folders are: a. \\192.168.11.111\ASP_APP b. \\192.168.11.111\ASPNET_APP2. Server B (as web server) I create: a. one website with home directory pointed to \\192.16... |
| 08/20/2005 5:50 PM | log4net access web.config on remote share issue |
| Replies: 0 |
Dear all,here are the asp.net application that I setup:1. Server A (as network share resource) resides all the asp and asp.netapps. Including \bin, web.config, etc. Let say the folders are: a. \\192.168.11.111\ASP_APP b. \\192.168.11.111\ASPNET_APP2. Server B (as web server) I create: a. one website with home directory pointed to \\192.16... |
| 08/20/2005 3:47 AM | Log4Net Implentation Details - Is it Synchronous or Asynchronous? |
| Replies: 2 |
Forgive me if this questions was already asked before. I did read the archives, but couldn't find a similar entry. My question is does Log4Net does logging synchronously (basically, for example, log.Info(msg) does not return until msg is physically written to the log file/sink) or asynchronously (log.info(msg) will immediately return and the actual logging happens later asynchronously).
I... |
| 08/18/2005 8:54 PM | Bug in log4net.Appender.BufferingForwardingAppender? |
| Replies: 1 |
Using Log4Net 1.2 Beta 9 and with Lossy set to 'false', thelog4net.Appender.BufferingForwardingAppender appears to loose messages.Configuration----------------------<appender name="BufferedAppender"type="log4net.Appender.BufferingForwardingAppender"> <bufferSize value="4"/> <lossy value="false"/> <appender-ref ref="FileAppe... |
| 08/17/2005 6:52 PM | DatePatterns in RollingFileAppender |
| Replies: 3 |
Hi
I am using RollingFileAppender to log the messages. The RollingFileAppender should roll the files based on Date. For this, I need to set "DatePattern" property of RollingFileAppender. I am not able to find the correct DatePatterns that should be used for following. Please give me the examples that what date patterns should I use for following:
1. Rollover... |
| 08/17/2005 3:37 AM | Cannot switch between logging levels |
| Replies: 10 |
Hi, I have an ASP.Net application and I store many Session variables, so I’ve created a separate config file for log4net (log4net.config) because if any change is made to the web.config file all my Session variables are blown away. I have configured it with the following:
Global.asax.Application_Start:
MDC.Set("host", System.Net.Dns.GetHostN... |
| 08/16/2005 10:41 PM | Custom parameters |
| Replies: 1 |
I am new to Log4net, so forgive me if this has been answered, but I could not find an answer to my question in the documentation or mailing lists.
I saw one post in the mailing list that had custom parameters for the AdoNetLogger and I want to do the same thing. For example, every sample I see looks something like the sample I copied below. But, if I wanted my own custom parameter suc... |
| 08/15/2005 6:39 AM | RE: Log4net |
| Replies: 0 |
There are 2 ways to control the level at which events are allowed to be
logged.
Firstly the log event is routed to an appender based on the logger it is
logged against. The logger has a level which determines if the event is
routed to the appender or not. You can change the level for a logger
programmatically like this:
((log4net.Repository.Hierarchy.Logger)log4net.LogManager.GetLo... |
| 08/15/2005 6:27 AM | RE: RollingFileAppender - Questions are not answered |
| Replies: 0 |
Saurabh,
Can you try to specify the file property of the RollingFileAppender as a
fully qualified path, e.g.
<appender name="RollingLogFileAppender"
type="log4net.Appender.RollingFileAppender">
<file value="c:\Logs\l4net.log" />
...
</appender>
If the RollingFileAppender works with a fully qualified path, but not
wi... |
| 08/10/2005 2:10 AM | Getting Appenders At Runtime |
| Replies: 2 |
How do you get the active appenders at runtime? I apologize for a basicquestion, but an hour of googling and manual reading have led to nada.I'm working in 1.2.0-Beta8.I'm doing a DOM configuration with a simple rolling file appender set atroot, named "RollingFile". I am able to successfully log. However, I cannotfigure out how to grab a reference to the appender, which would be usefulfor de... |
| 08/09/2005 12:44 PM | log4net CF question |
| Replies: 1 |
Hi,Is it posible to configure log4net to reference it's dll from aDirectory. I have various applications running on a Handheld,and to save space I would like to avoid having multiple copiesof log4net in each Directory of the application.Thx,Johann________________________________________________Get your own "800" numberVoicemail, fax, email, and a lot morehttp://www.ureach.com/reg/tag |
| 08/08/2005 5:30 AM | Keeping old log files in RollingAppender |
| Replies: 3 |
I have following configuration for RollingFIleAppender, but it does not save my old logs. Every night the log file is overwritten. Can someon epoint to me that what needs to be changed to keep the old logs.<log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
<file value="Logs\l4net.log" />
<appendToFile value="true" />
<rol... |
| 08/06/2005 7:23 AM | Appenders current file path? |
| Replies: 1 |
Is there a way of getting the current filename (preferably the whole path)of a rolling file appender? I'm using a file appender that rolls on date andcreates specific paths for each month and year and I'd like to have myapplication bring up the current log file in notepad without having the userlook for it.Cheers!Russ |
| 08/03/2005 11:08 AM | What is wrong with Log4Net web.config? |
| Replies: 2 |
http://www.learnasp.com/freebook/learn/log4net1.aspxwhen we run that program it should output to trace.write the Log.Infostatements. |
| 07/30/2005 4:46 AM | cvs.apache.org down? |
| Replies: 3 |
Is it just me or is cvs.apache.org actually down?--533777336444244 |
| 07/29/2005 3:20 PM | RollingFileAppender does sometimes not work |
| Replies: 1 |
Hi,I have the latest version of log4net from cvs, but the RollingFileAppenderdoes sometimes not roll the logfiles.Here is the debug-log:log4net: RollingFileAppender: Moving[D:\Projekte\CarConfigurators\CC5\LogFiles\cc5-trace.txt] ->[..\\LogFiles\\cc5-trace.txt.20050728]log4net:ERROR [RollingFileAppender] Exception while rolling file[D:\Projekte\CarConfigurators\CC5\LogFiles\cc5-trace.txt] ->... |
| 07/28/2005 2:47 PM | How to pass parameters through coding in log4net Applications |
| Replies: 2 |
hi,Please tell me how can we pass the parameters like log filename for a log4netfile Appender through Code.Same i have problem in case of ADONetAppender like Connection String.Thanks & regardsVicky |
| 07/28/2005 7:15 AM | No output from l4n... OR Russell's an idiot... |
| Replies: 1 |
Let me start by saying that I am thoroughly impressed with l4n. I had theopportunity to see it work in full action when I added it to a serial driverthat was malfunctioning. It filled a file to 400 MB within a couple ofminutes without so much as a hickup. I wrote my own 'logging' utility thatactually caused more problems than the orginal errors because it couldn'tkeep up. lol. So anyways, thank yo... |
| 07/27/2005 12:42 PM | Not adhering to specified Level |
| Replies: 1 |
i have the following configuration:<root> <appender-ref ref="RollingLogFileAppender"level="ERROR"/> <appender-ref ref="SmtpAppender" level="WARN"/></root>but it logs messages of all levels in both appenders.if i specify it as follows:<root> <level value="WARN" /> <appender-ref ref="RollingLogFileAppender"level="ERROR"/> <ap... |
| 07/27/2005 12:27 PM | Ignoring BufferSize |
| Replies: 1 |
i am using an SmtpAppender and require log4net to sendemails of log messages of error-level only.setting the BufferSize parameter, sends me the contextof the message (which includes warn,info and debuglevel messages). how do i disable the context of amessage? that is, i need only that logged message tobe emailed. all other messages should be ignored. itried setting BufferSize to 1,0,-1 and even re... |
| 07/26/2005 7:03 AM | Truncate log file before each run |
| Replies: 3 |
Is it possible to configure appender to truncate log file before each run?
Thanks,
Usman
|
| 07/24/2005 6:47 AM | RollingFileAppender does not roll |
| Replies: 1 |
Hi,I have a problem with the RollingFileAppender (Date type): the rolled filesare not created.* Application Type : ASP.NET* Logging directory : <Application Root Directory>\Log\* My config file (interesting section) : <appender name="FileCompleteLog"type="log4net.Appender.RollingFileAppender"> &nb... |
| 07/23/2005 6:30 AM | Configuration in COM+ Server Application |
| Replies: 2 |
We are trying to use log4net (1.2.0-beta8) inside a COM+ Server Applicationon Windows Server 2000. We programmed the COM+ component in .Net. log4netdoes not log anything and there is no exception (If there is any exception,our component will write that to database). The log4net configuration isinside DLLHOST.exe.config under Windows/System32. My questions is where Ishould p... |
| 07/23/2005 5:33 AM | Reccomendation for shared use? |
| Replies: 0 |
I have just started using log4net and was wondering if it is reccomended toregister the dll in the gac on the server rather than bundle with eachapplication that uses it?_________________________________________________________________Express yourself instantly with MSN Messenger! Download today - it's FREE!http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/ |
| 07/22/2005 8:54 PM | Date in Log Filename |
| Replies: 2 |
does anyone know how I can log messages into a filewith the following filename format:mylog_yyyyddmm.logwhere "mylog_" and ".log" are constant and yyyymmdd isthe current date, and a new file is created for eachday.i know the RollingFileAppender can almost achieve thiswhere i can create a log file with the date appendedto the name but i'm not able to specify an extension.if anyone knows how to do t... |
| 07/22/2005 7:35 AM | How do I log at the _other_ levels? |
| Replies: 1 |
I want to log messages at levels NOTICE and FINE, but ILog doesn’t seem to support these levels. How would I otherwise gain access to an ILogger in order to use these levels?
WMB
|
| 07/22/2005 4:46 AM | Why does the FileAppender create a zero byte file when logger is set to OFF? |
| Replies: 1 |
When I set my root logger to OFF: <root> <level value="OFF" /> <appender-ref ref="FileAppender" /> </root>A zero byte output file for my FileAppender appender is still created.Why is this? I would expect no file to be created. |
| 07/22/2005 4:32 AM | Remoting and Adonetappender |
| Replies: 4 |
I am seeing a difference when I use remoting with adonetappender. Allvalues set with MDC (beta8 version) are missing from the table. All theother fields are populated. However when I use adonetappender directlyall the mdc values are being stored.Any idea why this might be happening?Thanks |
| 07/22/2005 2:32 AM | RE: File logging |
| Replies: 0 |
In log4net 1.2.9 beta you can do the following to set the File property
on a configured appender:
foreach(log4net.Appender.IAppender appender in
log4net.LogManager.GetRepository().GetAppenders())
{
if (appender is log4net.Appender.FileAppender)
{
((log4net.Appender.FileAppender)appender).File = "path";
((log4net.Appender... |
| 07/22/2005 12:05 AM | EventID and EventLogAppender |
| Replies: 2 |
I've tried just about everything I can think of and I just can't seemto figure out how to get EventID set to anything other than zero whenusing EventLogAppender. Is there a different form of Log.Error() I'msupposed to be using that will let me set this? Or am I missing someway to set a parameter prior to that call? I've been banging my headagainst the wall trying to figure this one out. Any help t... |
| 07/21/2005 5:36 AM | XMLConfigurator, Asp.Net |
| Replies: 3 |
Hello,
I have an ASP.Net application.
I initialize log4net in Global.asax using
log4net.Config.XmlConfigurator.Configure(myConfigFileInfo);
Can someone explain to me what is suppose to happen when I change the config file?
It seems that the running asp.net (the app domain?) thread is aborted and Global.asax Application_Start method is called again. This causes me som... |
| 07/21/2005 1:08 AM | checked out log4net-1_2_9 and build failed |
| Replies: 4 |
I tried nant -buildfile:log4net.build compile-all like it said in the docs and also tried build.cmd. All I got were errors(and the errors kept coming, I had to do ctrl-C). Here is some of them….. [csc] [csc] c:\AROOT\views\jakarta\log4net2\src\Appender\TextWriterAppender.... |
| 07/20/2005 9:20 AM | How do I set Category/Event in EventLogAppender? |
| Replies: 9 |
I may be blind but I just can't find it in the documentation. Cansomeone help me figure this out?--Jeremiah |
| 07/20/2005 5:25 AM | Log4Net XmlConfigurator Watch |
| Replies: 1 |
I am using VS.NET 2003, and log4net (1.2.0 Beta 9).I built a simple Windows test application and placed the required attributes in the assemblyInfo file. ... [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] &n... |
| 07/20/2005 4:09 AM | RollingFileAppender - MaxSizeRollBakups |
| Replies: 1 |
Hello,
I am using the RollingFileAppender and trying to accomplish the following:
I want my log files to be rolled over daily, and then overwritten/deleted each week.
i.e. I only want to keep 7 backup log files.
Looking at the SDK documentation, it suggests that MaxSizeRollBackups should work.
I have the following in my XML Config file (I’m using rollover by the minute level for tes... |
| 07/20/2005 2:41 AM | shared library |
| Replies: 3 |
Hello everyone,I have developed collection of tools that all share a common .NET librarythat I have developed. The DLL uses log4net with the RollingFileAppender. Iuse Nant to build all the tools and copy all the executables to a "bin"directory.Now here's my problem, because the shared dll uses log4net, everyapplication tries to open the same log file. I end up getting errors sayingthe log file is ... |
| 07/19/2005 11:57 PM | Updating log4net from version 1.2 b3 -- what happened to PropertiesCollection? |
| Replies: 1 |
Hi,
I am updating my project to use log4net version 1.2 beta 9. We were using beta 3 before (I think) .
We were using an object called log4net.helpers.PropertiesCollection. I can't find anything analogous in the new structure. I know that log4net.helpers is now log4net.Util, but Util doesn't have this object.
PropertiesDictionary is there, but it l... |
| 07/19/2005 4:09 AM | RE: WMI Events |
| Replies: 0 |
Writing your own WMI appender should not be too tricky.
The .NET framework has some nice features to allow you to define a .NET
type that defines a WMI event schema, instances of this type can then be
fired via WMI. You will need to define one of these objects that can be
Fired via WMI. Then implement your own appender (have a look at the
DebugAppender.cs in the log4net source for a g... |
| 07/16/2005 4:05 AM | using log4net in CodeSmith |
| Replies: 0 |
anyone has tried to using log4net in CodeSmith? I can't make it work.It will be great if we can using log4net when developing a template inCodeSmith.thanks. |
| 07/16/2005 3:54 AM | FW: MDC when using remoting |
| Replies: 3 |
Hi,
I have been using log4net beta 8 for sometime now with several different Appenders and they work great. I am now trying to use the remoting appender and I am experiencing some problems with ADONetAppender. Here’s what is happening.
I have a windows service which hosts the log4net on the server. It is set up to use ADONetAppender and LogFileAppender.
On the client side the... |
| 07/16/2005 2:22 AM | Getting started questions |
| Replies: 1 |
I just downloaded log4net and have added a few DEBUG logging statementsto my module. I am having trouble understanding how to initialize thesystem so logging will be enabled.My module is a NET 1.1 DLL that I am testing with NUnit and will behosted with ASP.NET.I want to log to a text file. How do I do this? I have even tried toplay with some of the example projects and I cannot g... |
| 07/15/2005 3:47 AM | Where do I place my Log4net.config file in an IIS-based Remoting Application? |
| Replies: 5 |
I have a .NET Remoting application for which I am using log4net. I have a number of clients and a server that is hosted in IIS. IIS has a Virtual Directory called RemotingServerEngine with a file "RemotingEngine.rem" in it.
Currently, the server has a web.config file with a log4net section in it, and this works great.
I would like to remove the log4net configuration s... |
| 07/15/2005 2:41 AM | Using %C, %F, %l, %L and %M in ConversionPattern |
| Replies: 5 |
Hello,
I'm interested in added method name data in my logging messages, so I've set up my RollingFileAppender like this:
<appender name="File - Support" type="log4net.Appender.RollingFileAppender"> <param name="File" value="c:\\LogFiles\\ReferenceApp\\ReferenceApp" /> <param name="AppendToFile" value="true" /> <param name="DatePatte... |
| 07/14/2005 12:56 AM | Having trouble connecting to the Telnet Appender |
| Replies: 2 |
Hello,I am attempting to connect to a local Telnet Appender and receiving thismessage from my Telnet client"Connecting To localhost...Could not open connection to the host, on port 23: Connect failed"I have tried localhost, 127.0.0.1 and my full IP. I always get the sameerror.Environment: WinXP Pro, .Net v1.1.4322 and Log4Net 1.2.9.0Telnet Appender Settings:<appender name="TelnetAppender" type=... |
| 07/14/2005 12:08 AM | RollingFileAppender filename param |
| Replies: 1 |
Hi,
I can’t seem to find any info to help with my (simple) problem.
I want to start several instances of a single exe.
1) Each instance should start by logging to a general file eg. “Batch.log”
2) Once the instance has enough information (obtained via DB calls), it becomes a specialization.
3) From this point onwards it should start logging to a different log-file eg “<jo... |
| 07/13/2005 3:23 AM | Windows Service |
| Replies: 18 |
I'm having trouble getting log4net working in my Windows Service application. Root is setup to use both event log appender and rolling log file appender but nothing is logged (No exception thrown either). What is the best way to troubleshoot?
Thanks,
Jason |
| 07/12/2005 10:42 PM | ADONetAppender and Oracle 8i ORA-12704: character set mismatch |
| Replies: 1 |
Hello All,I am running into an issue with the ADONetAppender and writing to anoracle 8i database. When the query attempts to run I get the followingerror.System.Data.OracleClient.OracleException: ORA-12704: character setmismatch This is proving to be a harder problem to solve then I though.Here is my config or at least the appropriate sections. It appears it ishaving some trouble with the conversi... |
| 07/12/2005 6:20 AM | Type int in ADOAppender. |
| Replies: 6 |
Dear Friends, I really tried several times to make my ADOApeender to accept a parameteras int, but did not work any time.The field in my database is an Int. My database is a sqlserver.If i change the database type to string, works, when i back to Int, doens'twork, and any error appears.This kind of configuration works ok....<param name="Parameter"> <param name="Parameter... |
| 07/07/2005 9:54 PM | Implementing your own logger for log4net |
| Replies: 0 |
Occasionly I'll recommend people "extend log4net and write your ownlogger" if the default behaviour of log4net doesn't do what they need.The usually routine is to post a link to this page: http://cvs.apache.org/viewcvs.cgi/logging-log4net/extensions/net/1.0/The examples on that page are well written and well documented. If youneed something even simpler, take a look at the code below. I'veimp... |
| 07/07/2005 6:46 PM | online examples |
| Replies: 4 |
on http://logging.apache.org/log4net/release/example-apps.html all of theexamples are 404. do they exist somewhere?-a |
| 07/07/2005 8:31 AM | can derived classes change the RollingFileAppender filename? |
| Replies: 1 |
I am using the RollingFileAppender, but don't like the way it tacks a"1", "2", "3" on the end of the filename because it means you can'tdouble click on the filenames to view them. i.e. log.txt.1, log.txt.2, log.txt.3 don't load very wellwhen you click on them.Is there some way to override the filename and provide your own?I was looking at the source ... |
| 07/07/2005 5:06 AM | Log4Net Threading Error? |
| Replies: 4 |
I have gotten the following error in my log4net log. This application can have multiple threads writing to the same log file. The Message and the trace stack below point to log4net... Any comments or ideas?(Using = VS.NET 2003, and log4net (1.2.0 Beta 9)2005-05-12 17:53:43,863 [1420] FATAL WMService.Control.Process [] - WMService.Service.ReceiveMessage() had an ExceptionException:... |
| 07/07/2005 12:11 AM | Configuration of Levels |
| Replies: 10 |
Has the configuration of logging Levels been implemented yet? Or is it stillstatic? |
| 07/05/2005 2:53 PM | general question |
| Replies: 1 |
Hi
in order too use more levels than :
FATAL,ERROR,WARN,INFO,DEBUG
for example: ALERT,CRITICAL... I will need to add New methods in ILog.cs:
void Alert(object message);
void Alert(object message, Exception t);
and implement them in LogImpl.cs?
Yahoo! SportsRekindle the Rivalries. Sign up for Fantasy Football |
| 07/02/2005 3:44 PM | Question |
| Replies: 6 |
I have d/l and installed the version 1.2.9 and I have subscribed to thecurrent list.When you say "place all the assemblies within the same logging repository(AKA domain)" could you show me an example config file of that? Also,should I stop using the getType method for specifying a logger, or should Iswitch to something like "ReanneCorp.Common.Library.Mail"?Regards,Ray Simpson |
| 07/01/2005 2:28 AM | Which context should I use? |
| Replies: 3 |
I've got a few logging routines that are going to only store infopertinent to that exact application event...Eg, login failed event will need username the person typed in etc...but dont want that value to be in global context.What would be the best method... to use log4net.core.LoggingEventcontext? And documentation says:%property{name} syntax in the layoutpattern, except whats the propertyand wha... |
| 06/30/2005 1:36 PM | Problem in Logging When calling Log4Net appenders from COM+ (ServicedComponent) |
| Replies: 2 |
Hello All,Iam facing a problem in Logging while using Log4Net.Im writing a middle tier ServicedComponent. Thecomponent is hosted in Component Service Explorer(CSE). In this component, im logging the errors usingLog4Net Appenders.But this is not working. Its not logging the messagesin Database / Event Logger. Its not showing any errormessage also.Earlier i faced the same problem for ASP.Net Project... |
| 06/30/2005 1:06 PM | ADONet appender parameter types |
| Replies: 2 |
Hi.I am using log4net 1.2.9 with .Net 1.1.For adonet appender what should be dbtype and size for sql data type "text"?Also in general what are the possible values that dbtype can take and how dothey map to Sql Server datatypes?Thanks,Hemant |
| 06/30/2005 5:59 AM | XmlConfigurator or DOMConfigurator |
| Replies: 1 |
I went from a DOMConfigurator and settings in my webconfig, howeverI'd like to pull that logging into its own config file. I decided thatsince domconfigurator was deprecated, or obsolete etc, that I wasgoing to use XmlConfigurator.Anyway I've currently got Log4Net.config, and changed my assembly info to read:[assembly: log4net.Config.XmlConfigurator(ConfigFile="Log4Net.config",Watch=true )]and my ... |
| 06/29/2005 12:22 AM | Skewed Time Stamp |
| Replies: 2 |
Hi,I would like to know when does log4net write to the output fileif I was using a file appender?In my application (multi threaded) the timestamp are skewed forthe logs (mostly 10 seconds, worse case 2 mintute), could it bea deadlock on my application? or a deadlock on log4net? or anyother reasons?Johann________________________________________________Get your own "800" numberVoicemail, fax, ... |
| 06/28/2005 10:29 AM | Re: FW: LOG4NET - Oracle 9i logging error |
| Replies: 1 |
It would be helpful to see the <appender> node that you're havingproblems with. Instead of setting parameters, you could create the rawINSERT statement yourself. Be careful with this though, it issusceptible to sql injection and/or bad sql being send to the databaseif the message contains a unescaped single quote.<commandText type="log4net.Layout.PatternLayout"><conversionPatternval... |
| 06/28/2005 7:21 AM | LOG4NET - Oracle 9i logging error |
| Replies: 4 |
Hi, I am getting following error while debugging logging to Oracle 9i. Do I need to set some parameters? Any help is appreciated.
log4net: DOMConfigurator: Setting Collection Property [AddParameter] to object [
log4net.Appender.ADONetAppenderParameter]
log4net:ERROR DOMConfigurator: Cannot find Property [pParameterName] to set obje
ct on [log4net.Appender.ADONetAppenderParameter]
&n... |
| 06/28/2005 3:00 AM | Log files misnamed |
| Replies: 2 |
I have a RollingFileAppender configured as follows: <log4net> <appender name="FileAppender"type="log4net.Appender.RollingFileAppender"> <file value="//tank/logs$/seo/log-" /> &nbs... |
| 06/26/2005 6:54 PM | RollingFileAppender stop write to log files |
| Replies: 6 |
Hi
we use the log4net version 1.2.0.30714 below is part of the code that configure the log4net (we dont use the config file).I use .net 1.1,my process are multi threaded
it somtimes just stop writing to the log file. it happens when the file ended and it need to open new file. (I juess it dont succeed opening the new file)
after starting my program again it write to the file as n... |
| 06/25/2005 1:20 AM | RE: [Log4net-users] Domains of other object types not showing up.. |
| Replies: 1 |
Nicko,Thank you for responding. I am subscribing to the proper list on apache,and I am also going to install the latest version of log4net. When you say"place all the assemblies within the same logging repository(AKA domain)",are you saying that I need to create one logger for all the assemblies(instead of using typeOf(ClassName) I should using "MyAssembleLogger" ?Regards,Ray Simpson&g... |
| 06/25/2005 1:19 AM | Log file for each level |
| Replies: 4 |
Doesn't sound like a brilliant idea to me, but my manager wants me toproduce a separate log file for each log level and i was wondering whatthe best way to do this is?CJ |
| 06/24/2005 8:08 PM | Customized log4net, would like feedback/advice |
| Replies: 2 |
HiI've made a couple of customizations to log4net and would like to hearpeople's opinion on my solution.When logging I've made extensive use of properties to put data inspecific database fields. These properties must (as far as I know) beplaced in GlobalContext, ThreadContext or LogicalThreadContext. This canbe a bit of a drag since the properties are still active after logging,this results in cod... |
| 06/24/2005 2:44 AM | File path empty |
| Replies: 3 |
In my conversion pattern I use the %F or %file to get the file location with full file path. It outputs empty.
Any ideas/suggestions greatly appreciated.
Yvette |
| 06/23/2005 3:45 AM | Can't get logging output |
| Replies: 15 |
I am using log4net 1.2.9.0 (ASP.NET project, assembly type is a DLL) and am not able to get the logger to produce a log file.
My AssemblyInfo.cs looks like…
[assembly: log4net.Config.XmlConfigurator(Watch=true)]
My configuration is in web.config and is as follows….
<configSections> ... |
| 06/22/2005 11:25 PM | Log File Not Created with Pure XML Configuration |
| Replies: 16 |
I have a configuration using FileAppender. The log file is created only ifI configure through code like the following:log4net.Config.XmlConfigurator.Configure(newSystem.IO.FileInfo("tos.net-ri.exe.config")); I should be able to do thiswithout code through the default application xml config file but I have hadno success. My goal is to have log4net file logging through pure xmlconf... |
| 06/22/2005 4:08 AM | FinalizeConverter in log4net.helpers.PatternParser |
| Replies: 2 |
The method: protected void FinalizeConverter(char c) on line 237 of..\src\helpers\PatternParser.cs is not marked as "virtual" so we can'tcreate custom log formats.Version - 1.2.0 beta 8Thanks,Scott Wojan++++++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... |
| 06/21/2005 1:06 PM | Rolling File Appender provided by Log4Net |
| Replies: 4 |
We are planning to use Rolling File Appender provided by Log4net.
Our requirements are like below:
1. Rolling File Appender should be able to log the messages into a local file with an extension of .log2. It should write the message in xml format in local file.3. It should be able to roll log files based on either size or date. When the current log file reaches a particular size/date, a new log ... |
| 06/21/2005 3:57 AM | TypeLoadException using Log4Net on PocketPC |
| Replies: 0 |
I am trying to use Log4Net on Compact Framework application.This is the relevent bit of code: log4net.Config.XmlConfigurator.Configure(new FileInfo(@"\Log4Net.config")); log4net.ILog log = log4net.LogManager.GetLogger("root");When I call the GetLogger function I get the following exception: &... |
| 06/21/2005 1:41 AM | logging web services |
| Replies: 2 |
I am trying to log from a web service, and am getting errors about acquiring locks on the output file. What extra steps need to be performed to use log4net to log web services? Here is my internal debugging:
log4net:ERROR [RollingFileAppender] Unable to acquire lock on file c:\inetpub\wwwroot\log4net_webservice_prototype\arc_prototype.Form1.log. Access to the path "c:\inetpub\wwwroot\log4net_webs... |
| 06/19/2005 11:44 AM | Help with Exception Please |
| Replies: 1 |
I recently deployed a new multithreaded, web application which uses remoting and log4net. The IIS server hangs and stops responding after a few hours, and since am new to both Log4Net and Remoting, I am trying to narrow down the cause.Frequently, I am seeing following exception in my Log4Net logs i.e. the file which is specified for collecting log4net's logs:***************2005-06-18 22:20:44,183|... |
| 06/18/2005 3:29 PM | log4net compared to NLog |
| Replies: 0 |
Hi!In response to my article at CodeProject I was asked for a Log4net vs NLogcomparison.I thought you might be interested:The article: http://www.codeproject.com/csharp/nlog.aspThe comparison:http://tinyurl.com/czm3dhttp://www.codeproject.com/csharp/nlog.asp?forumid=188721&select=1139520&df=100&msg=1139520Jarek--http://blog.jkowalski.net/ |
| 06/18/2005 2:57 AM | TypeInitializationException in log4net.Util.LogLog |
| Replies: 2 |
We've got a system set up where a Windows service kicks off a numberof sort of "sub-services", each in their own AppDomains. Eachsub-service is responsible for initializing the log4net system withinit's domain. Everything works fine on developer machines (runningWindows XP), but when we try to deploy it to a production machine(running Server 2K3) we get a TypeInitializationException (s... |
| 06/18/2005 1:44 AM | re: 1.2.9 beta |
| Replies: 4 |
I think its safe to say that no one uses 1.1.1 anymore. A lot of peopleon the list have been using 1.2.0 beta 8 in production for quick sometime. I started using 1.2.9 beta builds on some production applicationsa few weeks ago.--- Russell Haley <rhaley@axys.com> wrote:> Okay, let me try asking this question again:>> Is l4n 1.2.9 "beta" stable enough for production applicaitons or>... |
| 06/17/2005 5:15 PM | log4net stops logging. |
| Replies: 1 |
This is a repost of bug #1012845 on SourceForge.We are using log4net-1.2.0-beta8 with the MS.Net 1.1 framework on adual processor SMP machine running Windows 2000 server.We run our application as a service and the service is logging alot of messages from many threads. The 500kB files are filled inabout 2 minutes.After some random time (everything from five minutes to a week) thelogging stops. The ... |
| 06/17/2005 11:34 AM | Invokemethod and static log4net |
| Replies: 1 |
Hello,I have an assembly with a static variable:private static readonly ILog log4net = LogManager.GetLogger(typeof(Core));In one of the methods, I use this variable:private void myMethod(){ ... log4net.Debug("something to log"); ...}In one of my NUnit test, I create an inst... |
| 06/17/2005 3:00 AM | Different threads writing to different log files |
| Replies: 4 |
Hi,
I want to have different (and multiple) threads write to different log files. The number of threads varies (I don't know how many threads will run).
I thought the best way to do this will be by adding loggers and appenders programmatically. Is it possible? Is there another way to implement this?
Thank you,
Sharon |
| 06/16/2005 12:32 PM | common log4net.config for multiple web apps |
| Replies: 3 |
Hi,Can I have a common log4net.config file shared across multiple web apps. Arethere any pitfalls?Thanks in advance,Hemant |
| 06/16/2005 2:13 AM | Date Time in Header Footer |
| Replies: 10 |
I'm trying ot insert the date and time in the header footer blocks of mylog. I did a search on the mailing list but didn't find anything.I have tried %d, %date and \d without any success. <param name="Header" value="[BEGIN LOGGING AT \d]\r\n" /> <param name="Footer" value="[END LOGGING AT \d]\r\n" />Suggestions?Thanks!Russ |
| 06/15/2005 6:54 AM | LOG4NET - Oracle 9i logging |
| Replies: 7 |
Where can i get sample vb or c# for logging to Oracle 9i.
Usman
|
| 06/15/2005 4:49 AM | Multiple client log |
| Replies: 2 |
Hi,How do I use log4net to log message separately for each clientthat accesses a service on the server? My server app couldidentify each client but I need to log the messages from theclient separately (different folder/file for each client).Johann________________________________________________Get your own "800" numberVoicemail, fax, email, and a lot morehttp://www.ureach.com/reg/tag |
| 06/15/2005 2:04 AM | Solved- RE: Error with closed appender (More Info) |
| Replies: 1 |
Hi,I found the problem. In the destructor of helper class the appender wasclosed. So when GC removed temporary log helper it also killed the appender.I have to find out a better sollution.Small questions.1.If I use immedeate flush do I MUST to close appender?2.If I don't use immediate flush do I MUST to close appender?3.If I use ExclusiveLock do I Must to close appender?4.If I use MinimalLock do I... |
| 06/15/2005 1:50 AM | issue with AdoNetAdapter |
| Replies: 0 |
First let me give some background info, then I will describe my issue...1. VS.NET 20032. .NET runtime 1.13. Log4Net version 1.2.94. Windows Form application. uses log4net.dll debug version.5. Connecting to Oracle 9i databaseI am trying to set up log4net to log to an AdoNetAppender for Oracle 9i.When I went to test, I couldnot get any log messages to write to the database. I verified that theoutput... |
| 06/15/2005 1:00 AM | Info Only Appender |
| Replies: 4 |
I want to start by thanking Nicko Cadell for his previous response to thisproblem. I'm very pleased that there is a place to find answers for Log4Net.I was able to configure my appenders to work in tandem, but I still have anissue.1) I have created 2 custom appenders that are to log different messagelevels that are returned from my application. One appender is to record alllogging levels, while th... |
| 06/14/2005 11:46 PM | Error with closed appender (More Info) |
| Replies: 4 |
This is a log. May be it can help[3236] log4net: PatternParser: Converter [literal] Option [[] Format[min=-1,max=2147483647,leftAlign=False][3236] log4net: PatternParser: Converter [date] Option [dd MMM yyyyHH:mm:ss,fff] Format [min=-1,max=2147483647,leftAlign=False][3236] log4net: PatternParser: Converter [literal] Option [] ] Format[min=-1,max=2147483647,leftAlign=False][3236] log4net: PatternPa... |
| 06/14/2005 5:50 PM | Asynchronous Flag for AdoNetAdapter? |
| Replies: 1 |
Hi folks,I want to set the ReconnectOnError Flag, and the SDK documentation saysthat i should do asynchronous logging then.How do i set a async flag for AdoNetAdapter?ThanksRoland Kofler |
| 06/14/2005 12:42 PM | reconnectonerror |
| Replies: 1 |
Hi,log4net 1.2.9I want to understand the behaviour of adonetappender with "reconnectonerror"property set to true for following scenarios..1) When I call XMLCOnfigurator.Configure and at that time database is down 1.1 What happens to subsequent log calls on that adonetappender? 1.2 Will the appender keep trying to connect in an endless loop?2) When I call XMLCOnfigurator.Configure and a... |
| 06/14/2005 12:34 PM | how to log custom properties |
| Replies: 1 |
Hi,I am usingLog4net : 1.2.9, .Net 1.1If I need to log certain custom properties along with the log message whatis the best way to do it. I see ThreadContext.Properties andLogicalThreadContext.Properties. Not sure which of the two to use. Wouldlike to know specific scenarios for each of the two.Also I guess once I set a property on ThreadContext.Properties it will belogged for all subsequent... |
| 06/14/2005 4:01 AM | Ping Xie is out of the office. |
| Replies: 0 |
I will be out of the office starting 06/13/2005 and will not return until 07/05/2005.I will respond to your message when I return. |
| 06/14/2005 3:06 AM | 1.2.9 - Attempted to append to closed appender named... |
| Replies: 6 |
I am testing a simple app that consists of one exe and 3 dlls. I am trying to set it up so that each project (the exe and each dll) have their own unique static logger, config file, and output file. When I run, I get the desired logging in the desired locations for the exe and the first dll that is called. But for the second and third dlls, I get the following errors. Any ideas as to what is causi... |
| 06/14/2005 1:32 AM | Single App needs two appenders with two sets of rights question |
| Replies: 2 |
HiI have a requirement to write to a log file for all normal logging actions using the rolling file appender attached to the root or some other logger level. I additionally need to send an email to a given address if a fatal or Error message occurs. Both appenders work by themselves or attached to a logger at the same level but that is the problem. I need global coverage for both... |
| 06/13/2005 11:32 PM | Changes in 1.2.9 for log4net.Appender.RemotingAppender and log4net.Appender.SMTPAppender |
| Replies: 4 |
I upgraded from 1.2.8 to 1.2.9. This caused my remoting and smtp email logging to stop working. It all compliles fine. Did some of the xml configuration settings change?
__________________________________________________
Mark Kremer User Interface Specialist&... |
| 06/13/2005 11:32 PM | 1.2.9 log4net.Layout.XMLLayout |
| Replies: 5 |
Are there any examples showing how to configure this layout type? I am hoping to get an output file that would look like:
<header> <date>11:33:34</date> <user>JSmith</user> <info>Blah</info> &... |
| 06/12/2005 7:08 AM | Buffer flushing problem? |
| Replies: 5 |
I'm experiencing a problem that varies each time i run my app. Sometimesit reads all the content, sometimes just the top part. I don't want toprejudge things, but perhaps someone could comment on this question iposted?http://www.experts-exchange.com/Programming/Programming_Languages/C_Sharp/Q_21454942.html |
| 06/10/2005 10:18 PM | stable version? |
| Replies: 2 |
Is there an expected release timeframe for a stable version of log4net?I've used 1.2.0 beta 8 almost since it was released July 15, 2003. Wasthat a stable version? Is the current 1.2.9 beta to be considered "stable"?Sorry if this is an annoying question, but I'm honestly confused. |
| 06/09/2005 9:26 PM | file appender in web apps |
| Replies: 2 |
Hi,I am using log4net 1.2.9 and .Net 1.1I am planning to use a file appender to log Debug messages for a webapplication. Are there any drawbacks/limitations in using file appender for a web app given the fact that there will be many concurrent users. Alsoideally what should be the locking mode? Minimal or Exclusive. If Exclusivethen when will the lock be released ?Also do I need to explicitly... |
| 06/09/2005 9:15 PM | error log truncated |
| Replies: 2 |
Hi,My web.config contains following setting.. <appSettings> <add key="log4net.Internal.Debug" value="true"/> </appSettings><system.diagnostics> <trace> <listeners> <remove name="Default"/> <add name="textWriterTraceListener" &n... |
| 06/09/2005 8:28 PM | Where are the DB Recievers? |
| Replies: 0 |
Hi,As my Chainsaw Log gave me Failed to locate Receiver class:org.apache.log4j.db.DBReceiver Failed to locate Receiverclass:org.apache.log4j.db.CustomSQLDBReceiver I searched them in the CVS.Hum Hum, cant find em...Why, where, how???... |
| 06/09/2005 6:38 PM | Chainsaw - SQLServer please help |
| Replies: 2 |
Hello everybody,Sorry if it is a little off topic, since Chainsaw - SQLServerinteraction is not directly connected to log4net.But I hope that you in this list have the most experiences with thistopic.I wanted to read my db logs with Chainsaw, so i configured achainsaw.config<?xml version="1.0" encoding="UTF-8" ?><log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"debug="fal... |
| 06/09/2005 2:45 PM | log4net.Config.XmlConfigurator.ConfigureAndWatch() |
| Replies: 4 |
HiI would like to know what will happen if I get a logger using LogManager andmake a log call using the logger without first calling thelog4net.Config.XmlConfigurator.ConfigureAndWatch(configFileInfo). Willlog4net log an error( assuming log4net.internal.debug is set to true) orwill it silently ignore it? I tried it and it seems log4net is silentlyignoring it. Actually I would have expected some ... |
| 06/09/2005 5:56 AM | Spawning new threads / creating Timers in an Appender? |
| Replies: 2 |
I'm toying with the idea of extending the AdoNetAppender to add theability to run additional queries after a defined time period. Thesyntax would look something like this:<appender name="TableMaintenceAdoNetAppender"type="log4net.Appender.AdoNetAppender"> <connectionType value="..." /> <connectionString value="..." /> <commandText value="..." /> <tabl... |
| 06/09/2005 2:45 AM | AdoNetAppender wierdness |
| Replies: 1 |
First let me give some background info, then I will describe my issue... 1. VS.NET 2003 2. .NET runtime 1.1 3. Log4Net version 1.2.9 4. Windows Form application. uses log4net.dll debug version. 5. Connecting to Oracle 9i database I am trying to set up log4net to log to an AdoNetAppender for Oracle 9i. When I went to test, I could not get any log messages t... |
| 06/09/2005 12:15 AM | TraceAppender changes in 1.2.9 ? |
| Replies: 1 |
Hi thereWhen migrating to 1.2.9, i found that traceappender is sending to theoutput the "loggername:" before the conversion pattern. I tried tosomehow take it out.. but i couldn't.I know i can write my own appender, and like that i will get rid ofit.. but any chance of doing it with traceappender ?txs everybodyregards.. and log it! :)Hugo Batistawww.dotnetx.orgDotNet eXtended Framework |
| 06/08/2005 6:02 PM | Problem with empty properties and AdoNetAppender |
| Replies: 1 |
HiI'm using LogicalThreadContext.Properties to store additional data to belogged to my database. There is a problem however, with properties thathaven't been set, or have been set to null values. When building thecommand text log4net inserts the string value "(null)" for theseproperties. For text columns this is annoying but not a big deal, butfor any numeric columns this will cause an exception a... |
| 06/08/2005 2:25 AM | Logger/Appender that listens for events, then logs messages |
| Replies: 3 |
Suppose I have an object that when processes things internally raisesevents to give status updates.Is it possible to configure log4net in such a way that it registers forthese events then logs the message through the log4net framework?I'd like to do this via the xml config file. |
| 06/06/2005 8:03 PM | logging log4net exceptions to event log |
| Replies: 4 |
Hi,I am using log4net 1.2.9 from a web application as well as class library(.Net framework 1.1). If there are any errors within log4net, I want them tobe logged to eventlog. However, I dont want to log the Debug calls unless Ineed them. Can I configure the level of logging for internal log4net logcalls? |
| 06/03/2005 9:26 PM | File Access Error with RollingFileAppender |
| Replies: 7 |
> I am having problems with the log4net in a small test project (Using VS.NET 2003, and log4net (1.2.0 Beta 8)). It works fine when I use the ConsoleAppender, but fails to log some messages with the RollingFileAppender.>> I have a simple log4net test solution with a primary project and a library project with a simple class and log method.> Both projects call log4net.Config.DOMC... |
| 06/03/2005 7:16 AM | Advanced Configuration |
| Replies: 6 |
I've just begun to play with log4net after trying endlessly to getEnterprise Library working as I'd like it.I do have a few questions I was unable to find the answers for on myown (reading documentation/manual on logging.apache.org)this is all .net 1.1 and using 1.9b or whatever the latest build was.1) is there a way to explicitly from code tell my log entry to use aspecific appender?2) For adoapp... |
| 06/03/2005 1:53 AM | RE: How to create XmlAppender |
| Replies: 0 |
[Moved to the log4net-user list]You can configure a FileAppender to use the built-in XmlLayout, thiswill generate a file containing the logger, level, message and more foreach event. The configuration is as follows:<appender name="XmlFileAppender" type="log4net.Appender.FileAppender"> <file value="app.log" /> <layout type="log4net.Layout.XmlLayout" /></appender>... |
| 06/02/2005 1:06 AM | RE: RE:ASP.NET Blocking Problem |
| Replies: 4 |
Sorry to reply from a different address but I’m at home now J
I’m logging to a sql database using the standard sql appender. I can’t use the buffering as I need to guarantee that the entry has been posted to the database before I move on to do the actual code (can’t have the buffer being cleared halfway through due to the app domain dying). I’ll be doing some changes... |
| 06/02/2005 12:20 AM | Log4net threadsafe storage |
| Replies: 3 |
Hi, I'm writing an audit log utility for our product using log4net. There are custom fields need to be output. I used MDC to set those fields every time before calling ILog.Debut() (or Error(), Fatal()...). The following is the sample code // Set output fields log4net.MDC.Set("theUser", strUser); log4net.MDC.Set("sessionid", strSession); log4net.MDC.Set("machine", strClientMachine); //Output data ... |
| 06/01/2005 11:33 PM | ASP.Net Blocking Problem |
| Replies: 9 |
Hi,
I'm using log4net in an asp.net application to log page hits to a database. It's working really well, however, whilst recently doing some performance testing of 200+ clients I discovered that I was blocking which was seriously hitting my performance (halving the number of requests per second). The block was in the lock in AppenderSkeleton.DoAppend. It would appear that all ... |
| 05/31/2005 3:59 PM | Calling method |
| Replies: 11 |
Hi all,
I have my log4net functionality wrapped up in a logging component, I have my logger declare like so:
namespace Jkd.Vor.Utilities
{
public class Logger
{
private static log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
&... |
| 05/30/2005 4:46 PM | A couple of questions and comments |
| Replies: 7 |
Hi list!We're considering using log4net as a replacement for our own logginginfrastructure in our companies framework for developing businessapplications. I've compared log4net with our own implementation and have acouple of questions and things that may be interesting to add to log4net inlater releases.First, let me congratulate you for the nice job that you've been doing indeveloping log4net. It... |
| 05/28/2005 12:48 AM | Using machine.config for log4net configuration |
| Replies: 4 |
I'm trying to create central log4net configuration settings for multiple.NET components running on a single machine. I thought I'd be able todo this by putting log4net.dll in the GAC and adding log4net configsettings in the machine.config file. However, my web services stilllook for log4net configuration in the web.config files. When I add"log4net.Internal.Debug" to the web.confi... |
| 05/26/2005 6:37 PM | Using parameters with ADONetAppender and FireBird |
| Replies: 2 |
HiI''ve been working for two days now trying to send log information to myFireBird database using SQL parameters, but I've been unable to find anyhelpful examples or articles and could really use some help.For testing purposes I'm just using a very simple table called TESTTABLEwith a single column called TESTSTRING, of type VarChar. I've triedseveral things but here's what the appender definition ... |
| 05/25/2005 6:48 PM | log4net and .net Compact Framework |
| Replies: 2 |
Hi,I want to use log4net when developing for mobile devices (as there is noConsole.out).I can get the .netcf example to run and it creates the apporpriate log textfiles.However, I don't seem to be able to create create logs on simple programsthat I write. For some reason the config file is not copied across indeployment..NETCF EXAMPLE:Copying files from 'C:\MobileDevelopment\Logger\log4net-1.2.0-b... |
| 05/25/2005 3:47 PM | File logging in ASP.NET on Win2003 / IIS6 - Tip |
| Replies: 0 |
Hi all - I thought I'd share my experiences when usinglog4net in an ASP.NET application on IIS 6.0When using any of the file appenders from an ASP.NETIIS 6.0 will prevent the ASP.NET application fromwriting to the log file unless the process driving theapplication has write access to the directory inquestion.On WinXP / IIS 5.x it is usually enough to simplyallow the user running the ASP.NET work p... |
| 05/24/2005 5:12 PM | Re: EventLogAppender problems (SOLVED) |
| Replies: 0 |
Obvious (now) misconfiguration! Sorry for disturbing you (if I did). |
| 05/24/2005 12:16 AM | log4netContrib.AspNetPatternConverters |
| Replies: 0 |
I've written a collection of PatternConverter classes to make log4net1.2.9 beta play nicely with Asp.Net. They allow for properties of theApplication, Cache, Context, HttpRuntime, Request, Response, andSession to be used to configure log4net. Values from these objects mayalso be inserted into log messages without first having to place theitems in the MDC in code. This may offer more run-time style... |
| 05/23/2005 10:29 PM | EventLogAppender problems |
| Replies: 1 |
HiI am using log4net 1.2.9 beta and struggling to configure anEventLogAppender. I am trying to use the config file below, which hopefullyindicates, to the human eye at least, the effect I want to achieve.I have created a source called "DSC" in the Application log and written tothat successfully using the MS Framework EventLog class.I can also succesfully write to the Event Log using log4net,... |
| 05/20/2005 7:33 AM | AdoNetAppender losing first entry |
| Replies: 2 |
Hi,I'm using the config example for the AdoNetAppender and it's losing the firstlog entry.It's a very simple test - I log a count from 1 to 130 when I press a button.Everything works fine, including the buffering of 100 records etc, except thatit drops the first entry logged.Adding a FileAppender confirms the missing entry is being logged - it appearsin the file no problem.log4net v1.2.9VB.Net 200... |
| 05/20/2005 4:58 AM | Log file created but still empty ...?Works fine few days ago! |
| Replies: 0 |
Hello,a log4net.Appender.RollingFileAppender and everything work fine on myproduction computer but since few days, the log file is created but staysempty.Tried to search for rigths problems with filemon but every SEEMS ok ....any idea ?Thanks in advance for the help. |
| 05/16/2005 3:55 AM | Wrapping LogManager to make ILog not rely on log4net.ILog |
| Replies: 5 |
Nicko,Several months ago I found a post on the SourceForge forums thatdescribed how to abstract the log4net.ILog interface into somethinglike MyProject.Logging.ILog to allow a project to change its loggingimplementation. You provided sample code that looked something likethis:public class LogManager{ private static readonly WrapperMap s_wrapperMap = new WrapperMap( new WrapperCreationHa... |
| 05/12/2005 1:57 PM | Log4Net - IIS 6 Web Garden process |
| Replies: 0 |
Has anyone experienced logging issues running on IIS 6using Web Garden worker process set other than 1? __________________________________Do you Yahoo!?Read only the mail you want - Yahoo! Mail SpamGuard.http://promotions.yahoo.com/new_mail |
| 05/11/2005 10:18 PM | Multiple Log files |
| Replies: 7 |
I am trying to use Log4Net in a server enviroment. I would like to have the following features:
1. One log file for the server 2. Individual log files for every client that logs in.
As the clients will be running in the same process/memory space (of the server) - how do I configure Log4Net to do 1 & 2? Any help will be greatly appreciated.
-- RS. |
| 05/11/2005 8:41 PM | RE: regarding Filters |
| Replies: 0 |
If you need to block the WARN level events from an appender then you canuse the following:<appender name="ConsoleAppender"type="log4net.Appender.ConsoleAppender"> <layout type="log4net.Layout.PatternLayout"> <header value="[Header] " /> <footer value="[Footer] " /> <conversionPa... |
| 05/11/2005 7:11 AM | not getting a log file |
| Replies: 7 |
This file /tmp/owen.config (I added everyone full-control to /tmp) is used:<?xml version="1.0" encoding="utf-8" ?><log4net> <appender name="FileAppender" type="log4net.Appender.FileAppender"> <file value="c:\\tmp\\log.txt" /> <layout type="log4net.Layout.PatternLayout,lo... |
| 05/09/2005 12:13 PM | Log4Net on Windows 2000 and Windows 2003 |
| Replies: 10 |
I have recently added logging via log4net to myasp.net application running on a Windows 2003 Serverplatform (IIS 5.0). Log4net has been workingflawlessly until recently when I have been migratingmy application over to Windows 2003 Server on IIS 6.0.Log4Net is only logging the first requests and alsosporadically. It seems as if something is caching thelog request. Has anyone exper... |
| 05/07/2005 2:00 AM | XmlConfigurator.Configure missing |
| Replies: 1 |
Hello,I'm using log4net with .net 1.0.It works fine when I use BasicConfigurator.Configure but doesn't compilewith XmlConfigurator.Configure: the compiler cannot fin the type ofnamspace XmlConfigurator.I looked into the documentation for log'net.Config, I foundBasicConfigurator, DOMConfigurator, but not XmlConfigurator.Is there an error in the the online example using XmlConfigurator.Configure?Tha... |
| 05/07/2005 1:49 AM | FileAppender.ImmediateFlush does not work on CompactFramework |
| Replies: 0 |
log4net version: 1.2.9-betaPlatform: Windows CE 5.0 / NetCF 1.0Unfortunately, the FileStream.Flush method in the CompactFramework (used bythe FileAppenders) only flushes the stream to the OS's file buffers (via thenative fflush method). It does not flush the underlying OS's file buffers tothe actual media. You must call the native method: bool FlushFileBuffers(IntPtr handle)to ac... |
| 05/06/2005 12:05 AM | Example using log4net.Appender.ADONetAppender for 1.2.0 beta 8 and SQLite |
| Replies: 4 |
Other people might find this useful...This was tested against v0.21 of the SQLite .NET provider: http://sourceforge.net/projects/adodotnetsqliteSQLite doesn't have strongly-typed columns or field lengths but itsrecommended you still include this information for readability:CREATE TABLE Log ( LogId ... |
| 05/03/2005 8:35 PM | Detecting Internal Errors |
| Replies: 1 |
Hi guys,I feel a little stupid here, but no matter how much I browse through theSDK, I come up with zilch...How should my application detect that an internal error has occurred inlog4net?I see that the case with a bad configuration file can be detected by testingLogManager.GetRepository().Configured, but how do I detect other errors? Ifsay, a FileAppender for some reason is unable to open the fi... |
| 04/29/2005 12:01 AM | EventLogAppender configured but logger thinks that logging is disabled |
| Replies: 8 |
Hello,I have an ASP.NET 1.1. application.Here is my code: log4net.ILog log = log4net.LogManager.GetLogger("F2Logger"); log.Info("Some meaningful message);When I look at the log variable, Info is false (as are all the otherlevels).I've got a project reference to the .NET 1.1 release log4net.dll (1.2beta8).Here's hig... |
| 04/28/2005 12:53 PM | Dead links on your website: please help |
| Replies: 2 |
Hi there,Im very interested in learning how to use log4net.All of the downloadable samples athttp://logging.apache.org/log4net/release/example-apps.htmlare dead links. Can you please tell me how I can getthe sample code? Id be extremely grateful.Thank you!! __________________________________Do you Yahoo!?Yahoo! S... |
| 04/28/2005 7:40 AM | Is there an MSMQ Appender? |
| Replies: 0 |
Does anyone have an MSMQ Appender for log4net?I have a need for the following:- An MsmqAppender that would send a LoggingEvent and all of it's Contextproperties to a private message queue.- A windows service that can pick up the LoggingEvent and then continuelogging the event as if it was logged directly from the application thatmade the original call to the logger (except with a different set ofa... |
| 04/28/2005 2:29 AM | A mock log4net appender |
| Replies: 4 |
Hi,I wrote a mock log4net appender to ensure that my unit tests fails whensome errors are (sometimes silently) logged through log4net.Sample usage in NUnit style:[SetUp]public void SetUp(){ DOMConfigurator.Configure(); // create a mock log4net appender to verify that no error is outputted mo... |
| 04/27/2005 10:02 PM | Rolling Directories |
| Replies: 1 |
Hi,
I am using the RollingFileAppender to log to a file, rolling every 5MB and every day. What I would like to do is create a subdirectory for each day, so I would end up with something like this:
Logs\20050425\*.log
Logs\20050426\*.log
Logs\logfile.log
Logs\logfile.log.1
etc.
Is there a built-in way to do this or do I need to wrap up my own extension for this??
Tha... |
| 04/26/2005 11:36 PM | Log-viewer tool for ADONetAppender logdata |
| Replies: 2 |
HiJust wanted to let you know that I have written a simple tool to viewlogdata logged to a SQL Server database using the ADONetAppender, called(in lack of a better name) Log4net Database Viewer.It can be found (with source) here:http://www.totalannihilation.dk/wordpress/log4net-database-viewer/As far as I can google no other such tool exists, except Chainsaw whichhas caused me no end of trouble, a... |
| 04/26/2005 11:18 PM | Encripted messages |
| Replies: 1 |
Dear Sirs,What is the best way to have en encrypted logger, which encrips messages,before dumping into the file?Thanks in advance,Boni |
| 04/26/2005 3:06 PM | logging in a remoting scenario |
| Replies: 1 |
Hi. I'm quite new to log4net and just using it for simple situations.My question is on the possibility of capturing logging events acrossprocesses (remoting in .NET)I would want to be able to log messages from AppA running on my localmachine and also log messages from RemoteAppB running on a differentmachine where the log events for both are recorded in one log file onmy local machine.I've seen th... |
| 04/26/2005 8:25 AM | RE: Null values for int (revised) |
| Replies: 8 |
I'm logging data using AdoNetAppender_SqlServer. Some of the info I wantto log is best expressed in SQL columns of the int data type. Also someof the information is only defined during certain events.Ideally, when I log other events, the undefined int information shouldbe shown as SQL nulls. However so far I've only been able to figure outhow to log int values using a "magic" numerical value (in m... |
| 04/26/2005 7:59 AM | Null values for int |
| Replies: 0 |
I'm writing some code using AdoNetAppender_SqlServer. Some of the info Iwant to log is best expressed in SQL columns with the int datatype. Alsosome of the information only exists during certain events.Ideally, information that does not exist should be expressed as SQL nullvalues. However so far I've only been able to figure out how to logusing a special numerical value (in my case zero) to flag a... |
| 04/26/2005 3:15 AM | log4net on .NET 2.0 Beta 2 |
| Replies: 1 |
Are there any issues running log4net on .NET 2.0 Beta 2? I’m using log4net-1.2.0-beta8, and I’m trying to find the root cause of this error on one server. I have an .asmx that invokes methods of a class library I wrote, which uses log4net’s EventLogAppender. Invoking methods of the .asmx via web browser produces this error:
System.Security.SecurityException: Request for the permission of ... |
| 04/25/2005 3:04 AM | What is wrong with this code |
| Replies: 1 |
Dear All,I am very new with log4Net. Since use 1.2.9 version no log file is written.I beleave that I missconfigured something, since the configuration ischanged.Below is the full configuration. Can somebody please comment, did I forgotsomething? How can I debug this?Thank you in advance,boniPrivate Shared m_FileAppender As log4net.Appender.FileAppender...m_FileAppender = New log4net.Appender.FileA... |
| 04/23/2005 5:07 AM | how to add a custom level? |
| Replies: 1 |
How to add a custom level between FATAL and OFF?What I want to do is to create a custom level (to log some statisticsinformation) that will output in all config except OFF. I could useFATAL but this is just misleading since they are not FATAL errors.Thanks |
| 04/22/2005 1:33 PM | Re: AW: Severity Threshold |
| Replies: 0 |
Thanks a lot for the information.
It served my purpose.I am able to log only "Info" messages by FileAppender
Thanks
Shaily
>>> "Helbig, Dirk (EXTERN: HUD)" <extern.dirk.helbig@volkswagen.de> 04/21/05 12:56 PM >>>
Here is a little example:
<appender name="InfoFileAppender" type="log4net.Appender.RollingFileAppender"> &nbs... |
| 04/22/2005 8:25 AM | line numbers of exceptions no longer show |
| Replies: 4 |
I am pulling my hair out trying to figure out why the line number of the exception are not showing up in production.
In my dev and QA environment it works fine.
Example: QA / DEV
Exception: System.Exception
Message: System.Exception: fun with exceptions
at Transcripts.login.Page_Load(Object sender, EventArgs e) in d:\inetpub\wwwroot\transcripts\login.a... |
| 04/21/2005 8:36 PM | Number of logs |
| Replies: 3 |
Hi all,I just want to keep the logs from the last 10 days. Is it possible toconfigure this? Currently all logs are kept and none are removed. But I wantto keep them named by the day, e.g. 'log 20050421.log'. Any ideas? Thanks!<appender name="RollingFile" type="log4net.Appender.RollingFileAppender"><file value="Log " /><datepattern value="yyyyMMdd".log"" /><ap... |
| 04/21/2005 7:44 PM | Filtering on custom parameter |
| Replies: 1 |
Hi,
I have an ADONetAppender set up with a custom parameter 'userID'. I would like to be able to log DEBUG (or greater) messages for a certain user (or number of users) only, and have the other users log only INFO (or greater) messages. INFO is my master log level.
How would I go about doing this? Would one way of doing it be setting the master log level to DEBUG and using a... |
| 04/21/2005 3:43 PM | Machine name |
| Replies: 8 |
I may be being dumb here, but I can't see any way of getting hold of themachine name that an event is being logged from.I have multiple machines in a cluster using an ADOAppender to write to acommon database, and I want to write a column with the machine name in it.Is there a simple way to get hold of the name?Cheers,Bill |
| 04/21/2005 1:13 PM | Severity Threshold |
| Replies: 2 |
Currently the way log4net works is :
If I have set the File Appender threshold to "Info" then it will receive all those messages which has severity greater or equal to Info. For e.g It will receive Error and Warning messages also if threshold of Fileappender is set to "Info".
Is there any way by which I can say "Only Info" messages should be logged by FileAppender. Rest all other... |
| 04/20/2005 10:30 PM | ASP.NET Already Rolled Logfiles Locked and cannot be moved or deleted |
| Replies: 1 |
We have been using log4net satisfactorily for some time in a number of ourprojects but in one of our ASP.NET projects where we have aRollingFileAppender set to roll over at midnight, the rolling works fine andcreates the correct files and logs into them great. However as these filesare getting larger, our Operations team want to move them off the serversand back them up. Unfortunately the server w... |
| 04/19/2005 3:15 AM | More things a logger should (or shouldn't?) do. Was RE: Buffer Flushing and Table Maintenance in the ADONetAppender) |
| Replies: 2 |
Since we're on the subject of things a logger should or shouldn't do,what are people's thoughts on having the logger (log4net, nlog, etc.)automatically log certain well-known .Net objects (or Interfaces) suchas IDbCommand and IDbConnection via code proxy? I've used the IBatislibraries in some Java projects as part of my data access block: http://www.ibatis.comOne thing it does a very good job... |
| 04/18/2005 4:17 PM | Problem with headers and footers in beta 1.2.9 |
| Replies: 2 |
Hello,Last week, I downloaded the new 1.2.9 beta version and I started to convert one of my projects in order to use it.But, now, as announced in the Breaking Changes list, C style escape sequences are not supported any more.So far so good, but... With the previous versions, in the Header and Footer parameters, I added \\\"\\\\r\\\\n\\\" at the end of the line in order to avoid the first line of t... |
| 04/17/2005 3:27 AM | RE: Configuration Usage/Behaviour question |
| Replies: 0 |
You can specify the repository to use for an assembly using an assemblyattribute. This does have to be compiled into the assembly itself.[assembly: log4net.Config.Repository("Repository Name")]You can also specify the configuration attribute in the assembly tolocate the configuration for that assembly.[assembly: log4net.Config.XmlConfigurator(ConfigFileExtension="log4net",Watch=true)]There is an e... |
| 04/17/2005 1:51 AM | RE: Re: EventLogAppender |
| Replies: 0 |
I don't know if the event log service will periodically re-read theregistry information. Typically I reboot the server, however this maynot be an option available to you.Nicko> -----Original Message-----> From: news [mailto:news@sea.gmane.org] On Behalf Of Digoron> Sent: 11 April 2005 09:42> To: log4net-user@logging.apache.org> Subject: Re: EventLogAppender>> Eric,> I chang... |
| 04/15/2005 11:08 PM | StringMatchFilter isn't rejecting log events |
| Replies: 3 |
Hi,We went over this recently on the list -- what am I doing wrong? I'mgetting messages with the string "FK_ListingCostByDay_Listing" in them.Here's my config. Thanks in advance for your help!Baron <log4net> <appender name="SmtpAppender" type="log4net.Appender.SmtpAppender">.... [some stuff omitted] ....  ... |
| 04/15/2005 3:01 AM | .net 1.0 and building examples |
| Replies: 1 |
I have 1.1 installed on my computer. I'm building via nant, but thebuilds will not complete since the default is 1.0.I got around it when running the initial build by altering thenant.exe.config file to force it to point to 1.1, but I've beenencountering problems with other builds.Any help is highly appreciated.vr, Yvette |
| 04/14/2005 10:58 PM | need help starting up |
| Replies: 7 |
I’m having problems with learning how to use Log4net. I am trying to build a class that I can tack on to multiple codes so that I can monitor there usage. I am at the point that I can start it up, but it doesn’t record any other information. When I get out of my program and go back in, the log doesn’t append, it just restarts.
Any help will be highly appreciated.
&nbs... |
| 04/14/2005 6:47 PM | Bug in RollingFileAppender? |
| Replies: 2 |
Log4net-Version: 1.2.9.0 ASP.NET-Application running on MS.NET 1.1 SP 1 I've attached the debug-logging of log4net. Here the most import abstract from the log:
log4net: RollingFileAppender: Searched for existing files in [D:\Projekte\CarConfigurators\CRC\LogFiles] log4net: RollingFileAppender: curSizeRollBackups starts at [0] log4net: RollingFileAppender: [.20050413] vs. [.20050414] log4net: Rol... |
| 04/14/2005 2:35 AM | Buffer Flushing and Table Maintenance in the ADONetAppender |
| Replies: 6 |
Is there support for programmatically flushing the buffer?Is there support for deleting records in the SQL table that are olderthan a specified amount (to keep the table from growing without bounds)or do I need to roll my own?The information contained in this e-mail and any attached documentsmay be privileged, confidential and protected from disclosure. If youare not the intended recipient y... |
| 04/13/2005 12:41 PM | SmtpAppender - Cannot Access CDO.Message |
| Replies: 3 |
Hi, I'm trying to send exception notification via log4net's SmtpAppender.But I'm having trouble deciphering the following error message:System.Web.HttpException ... Cannot access "CDO.Message object" ...Here's what my appender looks like, I think it's okay, but... just in case:<appender name="SmtpAppender" type="log4net.Appender.SmtpAppender"> &... |
| 04/12/2005 7:32 AM | Null "SecurityContext" reference in FileAppender |
| Replies: 1 |
I am seeing an error when using the FileAppender withthe BasicConfigurator. I get an exception when log4nettries to access the "SecurityContext" property, as itis null.I put together a quick console app to demonstrate theproblem. Log4net debug output follows below.log4net version 1.2.9.0.NET framework version 1.0.3705.6018// BEGIN SAMPLE C# CONSOLE APP[STAThread]static void Main(string[] args){&nb... |
| 04/12/2005 1:42 AM | Help inserting GUID using AdoNetAppender |
| Replies: 1 |
I am trying to insert a uniqueidentifier (Guid) into a Sql Server tableand am having problems. I'm using log4net-1.2.0-beta8.CREATE TABLE [dbo].[Log_Test1] ( [ID] [int] IDENTITY (1, 1) NOT NULL , [DateTime] [datetime] NOT NULL , [RequestID] [uniqueidentifier] NOT NULL... |
| 04/12/2005 12:26 AM | Using v1.2.0 Beta 8 and v1.2.9 Beta at the same time? |
| Replies: 3 |
I am using a component that is built against v1.2.0 Beta 8 oflog4net.dll. The components ships with log4net.dll. If I want to usethe new version of log4net in the code I write, is there an easy wayfor the two assemblies to co-exist? |
| 04/11/2005 9:16 PM | OT - xml version 1.1 and XmlTextWrite/XmlTextReader |
| Replies: 0 |
In http://issues.apache.org/jira/browse/LOG4NET-22, Nicko Cadell wrote:> The System.Xml.XmlTextWriter does not know which version XML is being generated.When I did some testing on it, I found that neither(XmlTextWrite/XmlTextReader) handled <?xml version="1.1"standalone="yes"?>. Is there actually a means for either to use XMLVersion 1.1?My work around was to use XML 1.0 with a... |
| 04/09/2005 1:03 AM | Problem with Loggers, I'm wrong? |
| Replies: 1 |
<logger name="TitAlu.Main"> <level value="DEBUG"/> <appender-ref ref="Email" /> </logger>
<logger name="wf_ci.Base.WfBase"> <level value="INFO" /> <appender-ref ref="LogFile"/> </logger>
I have this In may config file..
And I getting in my email all INFO log from w... |
| 04/08/2005 11:35 PM | Filtering root log with LoggerMatchFilter doesn't work |
| Replies: 2 |
Hi,We are developing a project in which we are using log4net. We are trying to split the log up into different files, one for different sections of the code. So in our web.config file we have a "root" section that points to one rollingFileAppender and another "logger" section that points to a different appender. The second logger only logs items that come from a specific namespac... |
| 04/08/2005 6:36 AM | Special Folders In Configuration |
| Replies: 2 |
Hi,I am trying to get my FileAppender to log everything to a file in theuser's my documents folder. I can't seem to find any information onhow to specify special folders in the appender like:my documentsdesktopwindows dirI have found out how to specify the user's application data folderusing the ${APPDATA} variable, so I'm thinking it's something similar.Any ideas?ThanksCorey Mosher |
| 04/07/2005 3:29 AM | RemotingAppender error when called through a VB6 wrapper? |
| Replies: 3 |
We've made a wrapper so we can use log4net in some older VB6 apps like so:[Guid("8949D706-9D81-4e24-A0DF-FC42E50AEFD9")] [ComVisible(true)] [ClassInterface(ClassInterfaceType.AutoDispatch)] public class Logger { &n... |
| 04/06/2005 3:38 PM | lockingModel problem |
| Replies: 3 |
Hi!How to write log4net configuration section to have access to log file? Ihave ASP.NET application and section in web.config like this: <log4net> <appender name="FileAppender" type="log4net.Appender.FileAppender"> <file value="Logs\logs.xml" /> ... |
| 04/02/2005 8:55 AM | Publisher policy not being recognized by Appender type reference? |
| Replies: 3 |
Folks,-------------------------------------------------Using log4net v1.2.0.30714 (packaged with v1.2.8).NET v1.1, deving on XP, deployed to WinServer2k3-------------------------------------------------Up until a few days ago I was using the EventLogAppender provided bylog4net with a custom renderer and layout. The custom renderer andlayout referenced version 1.1.10.0 of my "Company.Diagno... |
| 04/01/2005 7:41 AM | ADONetAppender losing logs |
| Replies: 6 |
Hello all,We have log4net in a production system using the RollingFileAppender forall messages, ADONetAppender for INFO and above, and SMTPAppender forERROR and above for unhandled exceptions.We're logging web service calls with timing metrics at the INFO level,so we expect to see logs for that in the database (Oracle).We're seeing the correct information in the log file and over e-mail,but the da... |
| 04/01/2005 6:15 AM | how to use chainsaw with log4net |
| Replies: 2 |
I am using this appender:
<appender name="FileAppender" type="log4net.Appender.FileAppender">
&... |
| 04/01/2005 12:26 AM | Programmatically update the config file. |
| Replies: 6 |
Hi,I need to programmatically update the config file (log4net.config) in orderto keep the changes apply to my log system.I did not find anything to do that, maybe I have missed something.Does anybody have an sample?Many Thanks.Ciao, Richard. |
| 03/30/2005 11:28 PM | Getting log file path from log4j.xml file |
| Replies: 0 |
I am using log4j.xml for my web application. How
would I find out the location of the log file from
log4j.xml?
I am copying the log4j.xml below. Any help would be
greatly appreciated.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<!--
=====================================================... |
| 03/30/2005 1:43 PM | Missing LoggingEvents in RemotingAppender |
| Replies: 4 |
I just upgraded to 1.2.9 since I needed theILoggerRepository.ConfigurationChanged event.I can't for the life of me figure out what I'm doing wrong with theRemotingAppender. My configuration is very simple, no evaluator on theRemotingAppender, and the Root Level is All. I'm also running aRollingFileAppender (in the same Root logger, again nofilters/evaluators) and it's working perfectly.The problem... |
| 03/30/2005 12:25 AM | StringMatchFilter |
| Replies: 3 |
is there an opposite filter of StringMatchFilter?The problem I want to solve is to filter all logging info that containa special string to a logfile A, and all other logging info to aseparate logfile B. I don't want to all info in A repeated in B.thanks. |
| 03/25/2005 5:33 PM | General network error after MSCS SQL Active node switched |
| Replies: 1 |
Hello, I'm using Log4Net with a clustered (MSCS) SQL 2000 database in activepassive mode.When the active node switch while my application works, I lost databaseconnection. If I restart my application, it works fine. I'd like to keep itworking even if the active database node is switching!Log4Net Assembly Version : 1.2.0.30714My program assembly is a dll used by an exe as a windows service.I'm usin... |
| 03/25/2005 5:19 PM | General Network Error after MSCS Failover |
| Replies: 1 |
Hello,I've installed Log4Net with a database appender on SQL Server 2000 onwindows 2003 MSCS Cluster.When the first SQL node is active, everything works fine. If I stop myprogram, than activate the second SQL Node, and then start my program,everything works fine.The problem is that le active node is changing when my program is working.In this case, I'm getting the "General Network Error" from ADO.... |
| 03/23/2005 8:58 AM | Release of log4net 1.2.9 beta |
| Replies: 12 |
Greetings,Log4net developers are happy to announce the release of log4net 1.2.9beta. This, our first release during incubation at apache, includes manyenhancements and bug fixes.The log4net website documentation has been updated to be in sync withthis release.The release notes are available here:http://logging.apache.org/log4net/release/release-notes.htmlThe release can be downloaded here:http://l... |
| 03/21/2005 11:57 PM | SmtpAppender not working |
| Replies: 9 |
Hi,I've searched the web and read the manual and some of the code, but feelfree to point me somewhere there's an answer... I can't find much on this.My SmtpAppender isn't able to connect to the smtpHost. I'm on Windowsusing MS framework v1.1. Here's my config file (me@me.com is bogus -- I'musing a real value), test code, and the error I'm getting in the consolewindow when the log fails... |
| 03/21/2005 9:36 PM | Fwd: chainsaw and "escaping" XML entities |
| Replies: 8 |
I found a situation where Chainsaw didn't display logs as Chainsawtook an exception when it tried to handle some x01e characters in thelog text.It appears that log4net is generating malformed XML.Here's my posting in log4j Users and the reply to it:---------- Forwarded message ----------From: Mike Blake-Knox <mikebk824@gmail.com>Date: Fri, 18 Mar 2005 08:54:38 -0500Subject: chainsaw and "esc... |
| 03/19/2005 12:14 AM | wired log4net problem: it refused to log anything. |
| Replies: 2 |
I've been using log4net for a while and it works for all the project.But I met a problem today that log4net refuses to log anything in anasp.net application.here is the config: <configSections> <!-- Register a section handler for the log4net section -->&n... |
| 03/18/2005 11:34 PM | Creating new File Appenders |
| Replies: 1 |
Is it possible to implement my own FileAppender and have Log4Net pick it from the xml config file? If so, can someone provide an example?
Thanks, Ravi. |
| 03/18/2005 4:55 AM | System.TypeInitializationException when Log4Net called from Sub Main() in smart client? |
| Replies: 1 |
Hey All,I just tried running my app as a smart client & got the subjectexception before my main form ever came up. The app starts up fine whenrun from windows explorer.Some light googling landed me here, which seems to implicate log4net:http://www.tech-archive.net/Archive/DotNet/microsoft.public.dotnet.general/2005-01/1154.htmlIs this a known issue, or a red herring or...?Thanks!-RoyRoy ... |
| 03/18/2005 1:41 AM | 2 different log files in same application? |
| Replies: 3 |
Hello,I'm using log4net for a short time, and I have 2 questions.1. I'm using in a web application, and i need two use 2 different logfiles in same application.Is that possible? If yes, how can I do it?2. I'm using a txt file for my logs. Is there any application to readthose files?thanks,--Nuno Almeidanunoflalmeida@gmail.comhttp://couveroxa.blogspot.comhttp://cantapiriquitocanta.blogspot.com/ |
| 03/17/2005 10:59 PM | Log4Net only for the committed techies |
| Replies: 12 |
Hi,I have been following log4net-users for quite a while (and even had acouple of abortive efforts to get it working) and it strikes me thatthis is something which (at the moment) is only for the highlycompetent techies.If you go to the Apache log4net site you are presented with verylittle information on how to get it working (in a simple format), andif you follow the link to download you get 1.2 ... |
| 03/16/2005 4:41 PM | DOMConfigurator.ConfigureAndWatch |
| Replies: 5 |
Hi,I am using the log4net 1.2 framework in my application. I am using theDOMConfigurator.ConfigureAndWatch(FileInfo) to read and monitor anexternal configuration file. See code below which I us to start my logger. Private Sub startLogger() Dim sr Try ... |
| 03/15/2005 11:27 PM | request to unsubscribe |
| Replies: 0 |
unsubscribe
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager at postmaster at dor.state.ma.us.
*******************************... |
| 03/15/2005 11:05 PM | RollingFileAppender File Parameter |
| Replies: 10 |
Hello,
I'm full of questions today. Here's another one I've come across recently:
I've set up a RollingFileAppender append for my application:
<appender name="Rolling" type="log4net.Appender.RollingFileAppender"> <param name="File" value="c:\\LogFiles\\AppName\\AppName" /> <param name="AppendToFile" value="true" /> <param name="DatePat... |
| 03/15/2005 4:22 AM | COMPUTERNAME Environment Variable |
| Replies: 5 |
Here's something I've come across that maybe someone else has seen:
I've set up a RollingFileAppender:
<appender name="SMTP - Leo" type="log4net.Appender.SMTPAppender"> <param name="To" value="me@mycompany.com" /> <param name="From" value="fromaddress@mycompany.com" /> <param name="Subject" value="${COMPUTERNAME} SHARES Exception - Log4Net Generated"... |
| 03/11/2005 4:48 AM | Rolling file appender |
| Replies: 11 |
Is this a known problem? We are using log4net 1.2.0 beta 8.
When using a RollingFileAppender that's configured to roll by Date, logs created before noon on a given day are overwritten by logs created after noon on that day. So if you look at a log file before noon, you'll see logged events for that morning, but an event that is logged after 12:00pm overwrites the file so that all logs appear to... |
| 03/10/2005 6:07 AM | Anyone use aspects to insert entry-exit logging? |
| Replies: 0 |
The .net aspect tools seem to have no clear favorite:
Aspect#
AOP.NET
AspectDNG
Documentation/support/examples all are lacking somewhat, is
anyone using them in production?
Thanks,
Owen Corpening
Acorn Systems
|
| 03/10/2005 2:29 AM | Example works, can't get my first attempt to log |
| Replies: 2 |
Using log4net-1.2.0-beta8
I copy LogHelloWorld example to C:\Inetpub\wwwroot
Double-click LogHelloWorld.csproj, press “run”, press the “button” on the resulting page and bingo, get a log.
I rename the dir LogHelloWorld_orig, and create a new C# ASP .Net Web Application named LogHelloWorld, and follow the steps to add logging, and when I press “run” no logfile.
... |
| 03/09/2005 4:49 AM | ANN: NLog 0.5 beta1 has been released! |
| Replies: 0 |
I'm proud to announce that NLog 0.5 beta1 has been released.NLog is a .NET logging library similar in concepts to log4net,designed with simplicity and flexibility in mind. Many thingshave been improved since 0.2 beta1 and new website has beendeployed which describes them.Most important new features include:* .NET Compact Framework 1.0 support* C/C++ logging API* COM logging API* various fixes to A... |
| 03/08/2005 6:23 PM | EventLogAppender vs SysLogAppender |
| Replies: 2 |
Using log4net I am developing an application which should run independent of any platform(.net or mono).My requirement is to log the messages to system log on Linux and Windows Event Log on windows (as windows Event Log is the analog to Syslog on windows). I found that log4net which is used for .net(windows) already has the EventLogAppender to log the messages to Windows Event... |
| 03/08/2005 2:18 AM | problems. |
| Replies: 4 |
I've been trying my best to find code samples for using several of the appenders so I wouldn't bother you good folks. So far I'vehad no luck. I can find the config file entries but nothing else.Here is what I'd like to do:Use the SMTPAppender and SmtpPickupDirAppender. I can't get either to work.I assume that in the code you don't have to tell it what appender it is using (it's specified in the ... |
| 03/08/2005 12:23 AM | using multiple appender question |
| Replies: 1 |
When using multiple appenders (fileappender,smtpappender) do you have to tell the logger which one to send the message to or does it send it to all appenders?
thanks, Rut |
| 03/07/2005 9:50 PM | still looking for info on how to specify a location/filename |
| Replies: 4 |
Posted earlier but got no replies. Is it possible to have a log file named something other than log-file.txt?
I've tried changing it in the config file but it just seems to ignore what I put in there. Thanks, Rut |
| 03/05/2005 7:42 AM | Having trouble signing log4net.dll |
| Replies: 10 |
Hey All,I'd like to sign the log4net.dll assembly (version 1.2.0-beta8) w/alocally generated .snk, and am having trouble. I'm not NANT-literate,which is probably the issue.Here's what I've tried:Copied my snk file to the log4net basedir (in my case,c:\DeleteMe\log4net-1.2.0-beta8) and renamed it to log4net.snk.Opened c:\DeleteMe\log4net-1.2.0-beta8\src\AssemblyInfo.cs, and changedthe last fe... |
| 03/05/2005 4:21 AM | Support for "extends" attribute for appender tag in config file |
| Replies: 1 |
I often use the same "base" appender in my config files:<appender name="Base"type="MyProject.Logging.AspNetRollingLogFileAppender, MyProject"> <file value="~/Logs/Base.txt" /> <appendToFile value="true" /> <maxSizeRollBackups value="3" /> ... |
| 03/05/2005 3:19 AM | Secure Logging |
| Replies: 2 |
OK, here's a problem I'm sure many of you have come across:
We're planning on integrating Log4Net into our web application. We'll be using it for the normal purposes: logging user activity and creating debugging statements in case of exceptions, both of which will include information considered to be highly confidential. I would prefer to output our logging information to a ro... |
| 03/05/2005 2:59 AM | problem with fileappender |
| Replies: 1 |
I don't understand how you make the fileappender write the log to a different name other than log-file.txt.
My config file contains this:
<appender name="MyFirstFileAppender" type="log4net.Appender.FileAppender"> <file value="c:\\zTestfile.txt" /> <appendToFile value="true" /> <layout type="log4net.Layout.PatternLayout"> <conversionPattern value="%5p %d (%c:%L) - %... |
| 03/03/2005 5:52 PM | RollingFileAppender Problems using Multiple App Instances |
| Replies: 4 |
Hi,I'm having problems trying to log to a log file using multiple instances of an .exe. I've seen this problem on the forum a few times but unfortunately can't seem to find any satisfactory answers.Some solutions point to using a RemotingAppender but unfortunately a) I'm having trouble finding documentation on how exactly to use this, and b) I suspect this approach requires a completely separate p... |
| 03/03/2005 2:26 AM | ADO Parameter Caching |
| Replies: 1 |
HiI may be chasing a red herring here...I've written a custom ADO appender based on the appender skeleton - thecode's pretty much similar to the example appender, except I parse themessage from the event (it's xml) and use the values there-in for theparameters. I've a stored proc defined in the config that takes 10 params -3 are mandatory. Everything works fine, as in I get my events logged to t... |
| 03/03/2005 12:33 AM | Memory Appender / Config Merges |
| Replies: 1 |
I'm working on a project that uses log4net throughout the entire application. We're creating a gui for this application and would like to display logging information within it. We've created a memory appender and have figured out how to extract and display event information.
The problem is that the programmatic configuration of our memory appender appears to be blown away by the rest of t... |
| 03/02/2005 9:26 PM | Include Custom information in Logs |
| Replies: 1 |
Hi,We in our company would like to include custom data - this means datafrom our distributed application architecture - in our logs. What is the"best" way to do this? Is writing my own Layout and "augment" the logentry here a recommended way or are there more elegant alternatives?CheersChristoph |
| 03/01/2005 12:15 AM | separate log info from a particular method |
| Replies: 4 |
Hi,I am using RollingFileAppender for my whole application. Suppose themain logfile is A.txt. I want to log all information from a particularmethod to a separate file say B.txt (these log should not be logged toA.txt). StringMatchFilter filter should be work, however theparticular method has to log a particular string in order to use theStringMatchFilter fileter. Is there any other convenient way ... |
| 02/28/2005 8:22 PM | Memory leaks with large multi-threaded application. |
| Replies: 1 |
Hi folks,
I’m pretty sure I’ve found a large memory leak when running multi-threaded applications and using log4net tracing. I’ve isolated it down to log4net by commenting out the <log4net> node out of the configuration file.
We’ve coded log4net (the latest beta version 1.2.0-beta8) into our application. With log4net enabled we see our virtual memory increasing and never decreasing, over a... |
| 02/27/2005 2:36 AM | Logging truncates the file at noon |
| Replies: 7 |
Hi,I've searched Google and the Eyebrowse for this and can't find anythingrelevant (EyeBrowse seems to have a lot of issues -- about half the linksI click on just lead to a stacktrace). I'm not sure if this is an issuewith log4net or my configuration. Any pointers are much appreciated.Problem: my log files are rolled daily, but every day at noon the existingdata is blanked out of the l... |
| 02/25/2005 9:59 PM | need sample |
| Replies: 5 |
Can anyone point me to some sample c# code on how to set up the logger and fileappender? I've tried following the examples in the supplied documentation but I don't understand it all.
For example,
ILog log = LogManager.GetLogger(typeof(Form1)); FileAppender fa = new FileAppender("c:\\znewlog.txt");
This fails because fileappender constructor is looking for another parameter of type I... |
| 02/25/2005 7:23 PM | dumb? newbie question |
| Replies: 1 |
Can someone tell me what I need to reference to use the log4net in my c# project. Is it just the log4net.dll?
Thanks Rut |
| 02/25/2005 2:52 AM | Can I force file writes? |
| Replies: 0 |
Is there a way to make the logger write to a file immediately after each log command? It appears to write the log file when the program ends.
Thanks,Rut |
| 02/21/2005 2:03 PM | Log4Net Viewer |
| Replies: 38 |
I am currently using RollingFileAppender for my C# application, is there any tool(written in .net) that can be used to view logfile of RollingFileAppender.
Thanks
Shaily
|
| 02/19/2005 7:25 AM | very simple question |
| Replies: 1 |
I’m a Java guy trying to get the hang of C#
Extremely basic question I’m sure:
LogManager.GetLogger() returns ILog
How do I access the underlying Logger object so that I can call SetLevel, AddAppender, etc?
Thanks,
- Damon Williams
PayPal Developer Technical Support
dawilliams@paypal.com
|
| 02/19/2005 5:26 AM | Microsoft Enterprise Library Logging Block compared to Log4net |
| Replies: 0 |
I came across this blog post today:Microsoft Enterprise Library Logging Block compared to Log4nethttp://weblogs.asp.net/lorenh/archive/2005/02/18/376191.aspx- Ron |
| 02/18/2005 9:20 PM | EventLogAppender |
| Replies: 7 |
Hi, I'm using EventLogAppender to log to windows event log. Does anyone know how to config it so that it outputs the logging to a specific log instead of Application log? for example to CACI log in the screenshot shown below. Thanks. Ping XieCACI4831 Walden LaneLanham, MD 20706pxie@caci.com(301) 306-8200 - Main(301) 306-2829 - Direct |
| 02/18/2005 2:31 AM | Announcing Log4Net Viewer |
| Replies: 1 |
Log4Net Viewer is a GUI log viewer and filter for the Log4Net library. Bydefault it listens for LoggingEvent objects sent using the UdpAppender anddisplays them in a table.The events can be filtered based on:LevelLoggerMessageAll the details for each event can be displayed by selecting the event inthe table.Project home page: http://www.devintelligence.com/Log4NetViewerDownload link:http://w... |
| 02/18/2005 12:28 AM | Viewer with filtering for files generated by log4net ? |
| Replies: 0 |
HiI'm looking for a tool to view and filter log4net text output (I don'twan't to filter the output itself through log4net configuration,rather filter over an already generated log after a problem occurred).I've seen this tool : http://www.codeproject.com/csharp/TraceTool.aspbut it doesn't seem to support filtering (eg : filter lines which weregenerated by a log named xxx).Is there any well known t... |
| 02/17/2005 11:16 PM | Computer name in parameter name of FileAppender |
| Replies: 1 |
Hi, According to the documentation the following section should work. <log4net> <appender name="FileAppender" type="log4net.Appender.FileAppender"> &... |
| 02/17/2005 6:19 PM | Stability of log4net |
| Replies: 7 |
Hi guysI am currently evaluating log4net for use in a new project. I am alreadyfamiliar with log4j so feel pretty comforatble with the feature set. Theonly concern is that log4net is no longer being maintained, and that thereare only beta releases of 1.2.Do you think log4net is OK for production code? Are there any particularversions to go for from a stability point of view, or v... |
| 02/16/2005 11:38 PM | Default initialization of log4net |
| Replies: 1 |
Hi, recently i realized that there was some logging output via log4net in my app before any initialization by one of the configurators happened. This logging calls lead to no output on any of the logging sinks at all and I started wondering how log4net handles these calls internally. As I could not find any documentation on this for log4net, I found out that log4j features a default initialization... |
| 02/14/2005 10:24 PM | Programmatically determine if DOMConfigurator.Configure() failed |
| Replies: 1 |
HiI've read the FAQ which tells this :"However, log4net will output a single message to System.Console.Errorindicating that logging can not be performed."Is there a way to programmatically (rather than visually) diagnose alog4net initialisation failure (especially through DOMConfigurator) ?I'd really like my application not to start in that case...ThanksThibaut |
| 02/14/2005 8:28 PM | NDC in threads? |
| Replies: 2 |
Hey,I'm wondering: is there a way to log with a specific NDC from a threadwhile the rest of the application uses a different NDC (or an emptystack, rather)? It seems to me like the current mechanism can only beused to differentiate sequential parts of the application, not thosewhich might be running in parallel. Is that right? Is there a solution?Thanks, &n... |
| 02/12/2005 4:25 AM | log4net, UDPAppender and Chainsaw v2 |
| Replies: 4 |
Hi All,
I have a two part question:
I recently installed Chainsaw version 2 and configured it with a UDPReciever to capture and display log4net messages. My Chainsaw receiver configuration looks like this:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org... |
| 02/11/2005 11:03 AM | Dynamically changing connection string in XML config file. |
| Replies: 2 |
Hello all,I was wondering whether it was possible to set the ADONetAppender's connectionstring in code when configuring log4net? During testing I have a configfile which had a hard coded connection string for the database connection.I would like to modify that just prior to log4net being configured, butstill have the configuration in the XML file. Is this possible?Where I had:log4net.Config.DOMCon... |
| 02/11/2005 9:57 AM | FileAppender's OpenFile() has mandatory call to Directory.CreateDirectory(...) |
| Replies: 1 |
When I uploaded my project to my web hosting company I was able tocapture log4net's internal debug messages and output them to a file(which tells me the folder where the log files are being written toexists and is writable). The following exception appeared in the logfile:OpenFile(d:\hosting\xyz\Logs\log.txt,True) call failed.System.IO.DirectoryNotFoundException: Could not find a part of the path"... |
| 02/11/2005 2:23 AM | Solution for problem using Rolling FileAppender |
| Replies: 0 |
Thanks for the guys who attempted to solve my problem.
As suggested in the FAQ, I did give permissions to ASPNET user for my
log directory. The mistake that I did was that my ASPNET user was
trying to fetch the ProcessName (which needs Unrestricted Security)
before it even adds the Appenders to the logger. So, when this fails,
log4net gives up adding any Appenders. Hence, no log file.... |
| 02/10/2005 8:43 PM | Logging in a Web App (Threads, Sessions and Requests) |
| Replies: 7 |
I have a Log4Net problem/situation that I'm sure many of you have come across and have (hopefully) overcome. I scoured the 'net for an answer but wasn't able to find exactly what I needed.
I'm starting to use Log4Net in my web application and I'm quite pleased with it overall. I was a user of Log4J when I was programming J2EE apps, so obviously Log4Net is a comfortable fit.&nb... |
| 02/10/2005 4:30 AM | Duplicate Log statements |
| Replies: 1 |
I have recently started using log4Net and our intent is to use it for logging on an engineeringapplication that we are developing.I have run into the following problem:-I have two levels of logging defined in my config file. One level for my client app and anotherfor an assembly dll that this exe uses.-When I try to log using logger.Info("log something") in the client.exe I get the follwing output... |
| 02/10/2005 2:38 AM | URI formats are not supported |
| Replies: 4 |
Hello all,
First posting here so please be gentle. J I’m hoping this is a known issue and has an easy fix. Although I’ve found someone else having this issue by searching the net, their solution was to remove Log4Net. That’s not what I’m hoping for. My previous experience was with Log4J so please excuse any blatant ignorance I’m working on resolving. J
General inf... |
| 02/09/2005 7:49 AM | Separate log records into different files by log level |
| Replies: 3 |
I have tried to search the forum for this topic, but with no luck, so I am posting a (hopefully)new question.I am trying to use log4net with an ASP.Net Web Service and it works great with the FileAppender orRollingFileAppender. However, all log records for the defined log level or above flow into thesame output file.My ultimate goal is to direct log entries for each level to a separate log file, i... |
| 02/09/2005 2:00 AM | Unable to log unless ASPNET user is an Administrator in Win2000 |
| Replies: 2 |
Hi all,I have written a C# SOAPExtension class that I use to log request andresponse data to a log file using log4net 1.2. I use theBufferingForwardingAppender and the RollingFileAppender classes.The logs turn up fine in Win2003 and WinXP. In Win 2000, no log filesare created unless I add the ASPNET user to Administrators group.I do not use the EventLogAppender in any way (I mention this as I read... |
| 02/08/2005 12:31 PM | ADONETAppender and stored procedures |
| Replies: 5 |
Hi all,I was wondering if the ADONETAppender could make use of output stored procedureparameters? I wish the logging to call a stored procedure and then haveit return some values (via output parameters), then use the returned valueselsewhere. For example, I wish to log to the event log the returned valuesfrom the stored procedure.Would I be better off implementing my own appender (by taking the AD... |
| 02/08/2005 3:46 AM | Another exception in RollingFileAppender |
| Replies: 4 |
When I start my application with the logging directory containing someold log files, RollingFileAppender takes an exception at line 803 (intbackup = int.Parse(curFileName.Substring(index + 1),System.Globalization.NumberFormatInfo.InvariantInfo);). At this point,curFileName is "ProphIT_CTI_Log.log.2005-02-01" and index is 19.Here's the output of a dir showing the specific files in the logdirectory ... |
| 02/03/2005 2:13 AM | RollingFileAppender Exception |
| Replies: 1 |
If I start my application while there is an old, "unrolled" log file(e.g., C:\myApp.log last modified 2005-02-01) in the loggingdirectory, RollingFileAppender reports:log4net:ERROR [RollingFileAppender] Exception while rolling file[C:\myApp.log] -> [C:\myApp.log.1]System.IO.IOException: The process cannot access the file"C:\myApp.log.1" because it is being used by another process. at Syste... |
| 02/02/2005 5:49 AM | Viewer for log4net |
| Replies: 2 |
Hello,What viewer (if any) is recommended for the log4net UDPAppender? I'vetried both Chainsaw and log4netviewer. I just can't get Chainsaw to seeany log entries at all, and log4netviewer is so buggy that I don't thinkI could consider using it.... Is there a commercial viewer that wouldwork properly?Regards,John Fingerson |
| 02/01/2005 5:05 AM | Setting EventID for EventLogAppender |
| Replies: 1 |
How do I set the EventID for the EventLogAppender?
This is my config:
<appender name="EventLogAppender" type="log4net.Appender.EventLogAppender" >
<applicationName value="WAHP" />
<layout type="log4net.Layout.PatternLayout">
... |
| 02/01/2005 12:14 AM | Log format (conversionPattern) |
| Replies: 4 |
Hi all,
I just tried Log4Net, and hope my question is not a FAQ.
Before to post a message I looked in the web Mailing List Details (but it seems there is a bug).
I copied / pasted the default appender for Text files, that is:
<appender name="FileAppender" type="log4net.Appender.FileAppender">
&... |
| 01/27/2005 9:49 PM | Date Formating |
| Replies: 1 |
I tried to follow the log4j date format guideline by using
%d{HH:mm:ss,SSS} but it isn't outputting the milliseconds. Anyone have an idea?
Dru SellersApplication DeveloperChina Leads, LLC
Site: http://www.chinaleads.net
|
| 01/27/2005 6:05 AM | FileAppender & RemoteLoggingServerPlugin |
| Replies: 10 |
Hi Guys,
As we all know that FileAppender locks the file when logging is ON and another process can not acquire handle of the file. You recommend solution to it by using RemoteLogginServerPlugin. My understanding for this is that you will have deploy a remoting server application (which is always running) to do this.
Please correct me if I am not clear about RemoteLogginSer... |
| 01/26/2005 11:30 PM | Parser Error Message: Access is denied: 'log4net' |
| Replies: 1 |
All--Please help.Has anyone see this error?The situation is this.We have log4net set to log to the EventLog.We have created the necessary EventLogSource on the machine.The log4net component is writing messages to the EventLog.However...Sometimes the following happens...We run our application in VisualStudio in Debug mode.The application crashes hard, at the application-level and/or at thedatabas... |
| 01/26/2005 11:22 PM | .NET 2.0? |
| Replies: 14 |
Hello,
I know it’s not supported yet, but has anyone out there successfully attempted to use this against .NET 2.0? I’m interested in building an Appender to hit SQL Server 2005 – but I don’t want to go to far down that path if others have already tried and failed to use even the most basic Log4net 1.2 Beta 8 features in a .NET 2.0 environment.
Any thoughts or trials?
... |
| 01/25/2005 8:47 AM | HEAD build fails |
| Replies: 1 |
Greetings,In CVS HEAD, Line 137 of /src/Config/XmlConfiguratorAttribute.csappears to contain malformed XML, and barfs on a log4net.build.Specifically, <c>MyExt</co> looks like it should be <c>MyExt</c>cheerssi |
| 01/25/2005 6:12 AM | ADONetAppender through a firewall |
| Replies: 5 |
We have been running into trouble while using ADONetAppender to log to a database that is behind a firewall.In short, the firewall times-out idle connections, and log4net doesn't reconnect to the database once the connection is broken.I added some code like this, and it seems to fix the problem./// <summary>/// This method determines if there is a sense in attempting to append./// </summa... |
| 01/22/2005 5:16 AM | Logging not working in some classes |
| Replies: 1 |
Hi, I've got logging setup and working fine in a number of apps, but all of asudden it won't work on new apps, but only in a few classes.Ie: in class Main, logging returns nothing, but in class util which maincalls, logging works fine. Any thoughts?? Or suggestions? (using 1.2.0 Beta 8)//Here is the one that is NOT workingprivate static readonly ILog log = LogMana... |
| 01/21/2005 11:08 PM | Configuration File Issues |
| Replies: 1 |
I have created a component to abstract the logging functionality of log4net.For ease, we'll call this component, 'Foo.dll'.'Foo.dll', is used in all applications for logging. A static method iscalled for each logging statement.I am trying to figure out how to configure the log4net logger through'Foo.dll'. I have created a configuration file named 'Foo.dll.log4net'. Ihave placed the following code ... |
| 01/21/2005 9:58 PM | Information about the new conversionPattern syntax needed |
| Replies: 3 |
I finally found out why all my output was messed up: the configuration patterns in 1.2 Beta 8 have changed, e.g.
%message is now %m %newline is now %n %thread is now %t
I did not find any information whether the syntax in earlier Beta versions follow the old or new way. Where can I find a list of all possible conversionPatterns for 1.2 Beta8?
I further recommend to update the online document... |
| 01/21/2005 5:55 AM | log4net feature inquiry |
| Replies: 1 |
Dear Sir/Madam,
I have a query about the feature of log4net. I am using :
log4net version : 1.2Assembly type : exeHow code is launched: Using Windows Application (in C#)Runtime platform: MS Visual Studio.NET 2003
Currently, if the database connecting is lost , the log4net stops logging to the database . Is there a way ... |
| 01/21/2005 4:31 AM | Logging Exception Details into columns |
| Replies: 2 |
I'm writing a custom appender to log ERROR messages to the database. Isee a property to access the full text of the exception if the userspecified it, but I cannot find where the actual exception is.How do I retrieve the exception from the overridden append method?Thanks,Jason |
| 01/20/2005 9:18 PM | Re: Re: Has Anyone Seen THIS Error Before? |
| Replies: 1 |
Thanks Graham! I'm going to have to wait a few hours until I can test out your suggestion. I'll be sure to let you know.
I really appreciate you getting back to me.
Sheila
>
> From: Graham Innocent <gi@parthenoncomputing.com>
> Date: 2005/01/20 Thu PM 01:59:15 GMT
> To: Log4NET User <log4net-user@logging.apache.org>
> Subject: Re: Has Anyone Seen THIS Er... |
| 01/20/2005 10:01 AM | Has Anyone Seen THIS Error Before? |
| Replies: 4 |
Hi!
I’m brand new to using log4net, and am getting the following error when I try to run my test project:
log4net:ERROR DOMConfigurator: ConfigureFromXML called with null 'element' parameter
Needless to say, I am finding this quite frustrating, as I don’t know enough about log4net to really be able to debug properly.
The test project contains the following fil... |
| 01/18/2005 9:47 PM | Old question ? |
| Replies: 3 |
This may be an old question, but when i use ADONetAppender, i notice that the logs recorded in my SQL table ('Logs') are out of step. They log steps2,3,1 (instead of 1,2,3). Also, Step 4 is not recorded, but gets recorded in the next cycle as4,2,3,1 (so the 4 of the earlier cycle seems to have been buffered). Should i be closing some thread each time so that it logs all... |
| 01/18/2005 9:10 PM | Correct way to use DOMConfiguratorAttribute |
| Replies: 5 |
Hi,This follows somewhat on from my post a few days ago.I have a class library that uses log4net to provide logging, this is thenconsumed within a standard console application.I've applied the attribute to the class library assembly within theproject's AssemblyInfo.cs file as follows:[assembly: log4net.Config.DOMConfigurator(ConfigFileExtension="log4net",Watch=true)]The class library assembly is n... |
| 01/18/2005 2:27 AM | CVS |
| Replies: 0 |
Hello everybodyI try to get the latest build from log4net via CVS (anoncvs via apache.org),but unfortunately I cannot connect to the server because I sit behind afirewall (company restrictions)Does anybody know an alternative way?Best regards, Mit freundlichen Grüßen Dietmar WinklerSoftware Engineer_____________________________________________________________Tecan Austria GmbHUntersbergstr. 1... |
| 01/15/2005 1:05 AM | Problems with filters |
| Replies: 1 |
Hi,Thank you for the suggestions about the configuration, I'm now up andrunning. I've placed the configuration into a separate log4net file, andthen load this within my type's static constructor using theDOCConfigurator.ConfigureAndWatch method.However, I'm now attempting to filter the content displayed through theConsoleAppender. Although I want all levels displayed, I only want thosewith certain... |
| 01/14/2005 6:54 PM | Bug in log4net\extensions\net\1.0\log4net.Ext.EventID?? |
| Replies: 2 |
There seems to be a bug in the EventID extension for log4net. In the interface implementation, all functions have their level set to Level.INFO, as follows:
public void Warn(int eventId, object message, System.Exception t) { if (this.IsWarnEnabled) { LoggingEvent loggingEvent = new LoggingEvent((FullName, Logger.Repository, Logger.Name, Level.INFO, message, t); &n... |
| 01/14/2005 4:57 AM | vb.net sample code |
| Replies: 2 |
Can somebody give me an example of the usage of the <Assembly: log4net.Config.DOMConfigurator()>in vb.net. When I call this constuctor with parameters the compiler throws me an error that saystoo many arguments. I want to set Watch=true.Tnnx in advance __________________________________Do you Yahoo!?The all-n... |
| 01/10/2005 10:04 PM | when to use each log level |
| Replies: 5 |
Hi,I would like to set some guidelines for developers in my team on when each logging level should be used. Can someone who's been using this for a while provide some guidance?Eg.,FATAL - use when a critical system failure happens. This is a situation where someone would want to be paged in the middle of the night to fix.ERROR - for recording exceptions and other definite problem situations. You m... |
| 01/10/2005 11:14 AM | Database Appender |
| Replies: 11 |
> howdy everyone...>> im using the database ADONetAppender to log to a sql server database and its all going peachy keen... for a while...>> ive got the same app installed at 4 of our sites, with the appender pointing back to a central database accessible over the wan (i will probably end up using a local db at each site, but a central db was my going in position, with a "lets see... |
| 01/07/2005 4:43 AM | log4net can't find config file |
| Replies: 4 |
Hi,I'm trying to use log4net in a class library, so there's no .config file or global.asax file. Usually I have the following assembly attribute in the global.asax.cs to instruct log4net where to find the config file (named <myassembly>.dll.log4net):[assembly: log4net.Config.DOMConfigurator(ConfigFileExtension="log4net", Watch=true)]Since there's no global.asax.cs, I have the above assembly ... |
| 01/07/2005 3:26 AM | Release Date |
| Replies: 1 |
Hello,
I know it has been asked before, but can we get a ballpark estimate as to when log4net 1.2 will be released? I know the project is in incubation, but it's been over a year and a half now since we've seen an update. I'm starting to think this project is dead.
Having come from a J2EE background, I've been hoping to incorporate Log4Net into our .NET projects like ... |
| 01/07/2005 2:34 AM | Adding custom conversion chars in PatternLayout |
| Replies: 1 |
Hi,In log4j, I am able to add custom conversion characters toPatternLayout by writing classes that extend PatternLayout andPatternParser.Can I do the same in log4net ? How do I add custom conversion charswithout using MDC/NDC ?I am using log4net 2.0 beta 8.Thank you,Nik |
| 01/07/2005 12:46 AM | Multithreading and using FileAppender |
| Replies: 4 |
I have a console application that calls a function within a class (provided in a separate dll) from within a thread as follows:
Class1 c = new Class1(); Thread t = new Thread( new ThreadStart( c.Loop ));
The Class1.Loop() function is defined as follows:
public void Loop() { log.Info( "Info" ); &nb... |
| 01/06/2005 7:00 AM | Best practices to avoid logging same information multiple times |
| Replies: 2 |
I'm currently logging exceptions as soon as they occur. If an exceptionoccurs in my data layer, I log it in the catch block of the try itoccured. Should that exception also be caught at the very top layerthat initiated the exception (i.e. the btnSubmit_Click event thatstarted the form processing)?After seeing all the logging that comes out of frameworks like theStruts Framework for Java and data a... |
| 01/06/2005 6:11 AM | shutdown and appender sync |
| Replies: 3 |
Am I correct in assuming shutdown asks all the appenders to sync withthe data repositories, i.e. in the ADONetAppender I have the buffer sizeset to 50. If there are any messages to be log that are not yet writtento the db the appender be asked to write them?Marc |
| 12/30/2004 11:08 PM | IM or SMS support |
| Replies: 3 |
does anyone have an IM or SMS appender?
Dru |
| 12/30/2004 10:47 PM | logger question |
| Replies: 4 |
Can I do something like this? If not, how might I accomplish this?<logger name="MyObject"> <level value="INFO" /> <appender-ref ref="TableAppender" /> <level value="WARN" /> <appender-ref ref="EmailAppende... |
| 12/29/2004 10:08 AM | Calling Stored Procedure in CommandText in config file |
| Replies: 2 |
Hi, As the subject stated, How can i call a stored proc in the CommandText ina config file?I have been searching for it, but i'm unable to find a concrete example onit. The docs simply saidwe can write insert statements, or stored proc there. But i failed toexecute my stored proc. (which worksfine if i use insert statement, and the stored proc works fine in sqlanalyser)i tried &l... |
| 12/28/2004 3:46 PM | Question on Logging customized information |
| Replies: 2 |
Hi,
I would like to log some data via ADONETAppender into my own log table.
Say, my table LOG has column A(varchar(100)) and B (varchar(100)).
I do not want to log the default information such as %logger %thread %logdate etc...
instead i want to log my own A and B values into the database.
I am able to get it done if i only have one value , ie, A, by setting Patt... |
| 12/28/2004 12:16 PM | FileAppender |
| Replies: 3 |
Hi,I'm a newbie to Log4Net and I just gotASPNetTraceAppender to work, however, as soon as Iswitch to my FileAppender, nothing happens. log fileis empty.I'm using 1.2 beta8 and here is what I did under"myapp" application./myapp /config /log1. I have a /config directory holding the log4netconfiguration file[Logging.log4net]. I have a /logdirectory which will hold my log files.2. in my as... |
| 12/22/2004 11:55 AM | Re: ezmlm response |
| Replies: 1 |
I was wondering what the restrictions are (if any) with regards tousing log4net in commercial applications. I read the license, but Icannot fully understand what the requirements are. My apologies fornot understanding that, but I would like to make sure. Thanks inadvance.Regards,Dieg |
| 12/22/2004 8:06 AM | DoRender Question |
| Replies: 5 |
I have a general question: is it possible to have an overridden DoRender method apply
to each appender in a logger, instead of having it just apply to the logger.
The reason i am wandering, is because we need several different text representations
of an object, but to do that, we need seperate Renderer methods.
This is problimatic if you want one logger to... |
| 12/22/2004 3:46 AM | Appender customization |
| Replies: 2 |
I am creating my own appender, in a project that uses the log4net dll.
the problem is, I cannot get the xml config file to use this new appender.
Example:
before, I would say somthing like this:
<appender name="ADONetAppender" type="log4net.Appender.ADONetAppender">
but now, I try to say:
<appender name="ADONetAppender" type="log4net.ActiveSentryADONetAppen... |
| 12/21/2004 11:56 PM | log4net assembly locked |
| Replies: 1 |
I am having difficulty with my application maintaining a lock on the log4net assembly.
I have called
log4net.LogManager.Shutdown(); in the dispose of my Application context as the last line. Yet I still have a lock on the .dll
Any thoughts?
Dru |
| 12/21/2004 7:32 PM | Framework/ C# 2.0? |
| Replies: 0 |
Hey,will I have any problems using log4net together with the current Whidbeybeta? Does anybody have experience with that setup?Thanks Oliver Sturm--omnibus ex nihilo ducendis sufficit unumSpaces inserted to prevent google email destruction:MSN oliver @ sturmnet.org Jabber sturm @ amessage.deEmail oliver @ sturmnet.... |
| 12/21/2004 4:12 AM | New User question - configuration file format |
| Replies: 2 |
Hi there,I'm using log4net version 1.1.1 in a .dll assembly using VB.NET. I'm simplytrying to get a ConsoleAppender to work with my configuration file. For somereason, if I have the log4net configuration information in its own .configfile, log4net seems to read it properly. If, however, I have it includedwith other configuration information in the same file, it doesn't read itand no logging occurs... |
| 12/18/2004 10:52 PM | Why does log4net.LogManager.Shutdown() throw an exception? |
| Replies: 9 |
- $exception {"Object reference not set to an instance of an object." } System.NullReferenceExceptionWhen I try to close LogManager why does it throw an exception? |
| 12/18/2004 5:26 AM | How to use ErrorHandler |
| Replies: 3 |
How would I use the ErrorHandler property for an appender? For example,let's assume I'm using the ADONetAppender and for some reason it fails(i.e. unable to connect to the database server). I would like to notloose the message. I was thinking that I could use the ErrorHandlerproperty to define another appender to use in this case. However, I'mnot sure how to do this. ... |
| 12/18/2004 5:24 AM | LogManager.Shutdown |
| Replies: 3 |
Is Shutdown the same as Dispose?
If it is what about making another method called Dispose available for those people that are more .Net centric. If someone really wants to they could even implement IDisposable and remove the Shutdown method. But alas me thinks that might break someones code. Anyways just a thought, I had never noticed the shutdown method until today and just wanted to ver... |
| 12/18/2004 5:06 AM | trying somthing simple, and it fails |
| Replies: 2 |
All I am trying to do is make a fileAppender.
I just want to know how to use the log4net tool, but the documentation does'nt help me.
The problem is simple: the file I specify to be 'written' to does not get anything. I tied the log.Info method to a button click, but when i click, nothing happens.
And I KNOW the button click is working.
Am I just leaving out... |
| 12/18/2004 1:57 AM | Log4net Configuration Settings |
| Replies: 4 |
Hi,
I have recently started using the Log4net Tool. I read the documentation and it has great potential for logging errors, debugging purposes and tracing.
However I have not been able to probably configure correctly w.r.t. to my project.
Her... |
| 12/17/2004 4:21 AM | ADONetAppender - returning output parameters |
| Replies: 3 |
I've inherited and extended the ILog interface and LogImpl class andcreated a custom LogManager to allow custom parameters to be sent to anADONetAppender.Now I'm wondering: is there a way to get return values/output parametersfrom the internal DbCommand that is used to insert the record to thespecified table? The reason I ask is that it's possible that the tablethe logging information is being wri... |
| 12/16/2004 3:43 AM | Pass LoggingEvent obj to web service |
| Replies: 0 |
Hi, I'm trying to create a web service that will receive an array of LoggingEvent objects sent from a custom appender. I suppose this is a general .NET question on serialization, but what is the best way to do this?I tried playing around with the SoapFormatter class, which serializes an object into a stream. Then I tried creating a web service function that would receive and deserialize a stream. ... |
| 12/15/2004 9:56 PM | Make all appenders asynchronous |
| Replies: 1 |
I've written a couple of custom appenders: one logs events to a web service and one makes a Remoting call. Both have an attribute called Async. If set to true in the config file, the appender will do the work in SendBuffer() or Append() asynchronously. If set to false it will do it in the normal synchronous fashion.My AsyncRemotingAppender is identical to the RemotingAppender except for a bit of e... |
| 12/15/2004 5:16 AM | problem with rolling by date behavior of RollingFileAppender |
| Replies: 0 |
I am using the RollingFileAppender and have configured it to roll by date without specifying a DatePattern parameter. When I did that, it would log properly from 12:00AM midnight to 11:59AM, but the moment it hit 12:00PM noon, it would roll over on top of itself and start rewriting in the same file--thereby losing all logging from 12:00AM - 11:59AM. To work around this, I added a... |
| 12/15/2004 5:00 AM | Route LoggingEvent object back into log4net |
| Replies: 1 |
Hi, I'm writing a web service that takes a LoggingEvent object as a parameter (sent via a custom appender that makes calls to this web service). I would like the web service to take these events and route them back into log4net. Thus, log4net would be used by the web service to do all the actual logging work.How can this be done?Thanks,Simon. |
| 12/15/2004 12:35 AM | onlyFixPartialEventData - only need Logger Name |
| Replies: 5 |
The log4net docs say we should use onlyFixPartialEventData=true because the location information is "extremely" slow to generate.I can live without the class name, method name, line number, but the logger name is necessary. Otherwise how do you know where in your code base the event came from? The logger name contains the class so it's enough info to find your events, but without that how do you l... |
| 12/14/2004 10:40 PM | SecurityException using RemotingAppender |
| Replies: 1 |
Hi, I created a log4net.snk file using sn.exe, but I'm having trouble in Release mode. Debug works fine, and if I use AssemblyKeyFile("") in AssemblyInfo.cs instead of putting the path to the .snk file in the parameters, then Release mode also works fine. So I think something is messed up with my key.I'm using the RemotingAppender. If I use something like the ADONetAppender it works fine. Do I nee... |
| 12/14/2004 10:31 PM | Viewing log4net XML documentation |
| Replies: 10 |
How is one supposed to view the XML documentation for log4net that isgenerated by Visual Studio .NET (2003)? The VS command Tools|Build CommentWeb Pages doesn't process many of the tags (e.g., <para>, <i>) that are inthe C# source.I'd expected to find the answer in the FAQ but didn't. Some of the userquestions posted here could be answered by referring to it.ThanksMike Blake-Knox |
| 12/14/2004 7:37 PM | Getting the exception in a filter |
| Replies: 1 |
I need to be able to ignore specific exceptions in log4net from within theconfig file (specifically, the ThreadAbortException). I can't see any wayof doing this with the existing functionality, so was going to write acustom filter to do it. It would appear, however, that I can't get theException object of the LoggingEvent object passed in to the Decide method.I can get a rendered versi... |
| 12/14/2004 6:56 AM | Log an Exception |
| Replies: 5 |
I apologize if you get this message twice. I originally sent it to theold Sourceforge.net list before I realized it was closed.------------------How would I log an exception (type, message, and stack trace) using, forexample, the ConsoleAppender or FileAppender? It seems that the "%m"conversion character in PatternLayout prints my log message, and theexception type and message, but not... |
| 12/13/2004 12:49 PM | RE: SPAM-LOW: log4net not producing output |
| Replies: 0 |
Not to sound like a smart ass but are the configs cool? I
had this problem once and it was because I had used a hard file reference that
didn't translate to the server.
Dru
From: Andreas Knecht
[mailto:AndreasK@objectconsulting.com.au] Sent: Sunday, December 12,
2004 11:40 PMTo: 'log4net-user@logging.apache.org'Subject:
SPAM-LOW: log4net not producing output
Hello ever... |
| 12/13/2004 12:39 PM | log4net not producing output |
| Replies: 2 |
Hello everyone,
I have a problem with log4net not producing any output in a production environment. Everything works fine in my development environment, but when I deploy the application into production with exactly the same settings, no logging files are produced.
I've changed the directory settings to give the ASPNET user full access to the directory where the log files are, without any... |
| 12/13/2004 4:18 AM | nothing appearing on ConsoleAppender in web application |
| Replies: 1 |
Hi,I have setup log4net in an ASP.NET application. Logging works perfectly if Iuse a RollingFileAppender but if I use the ConsoleAppender, output does notappear in the console when running in the debugger (VS.NET 2003).I am configuring log4net with: [assembly: log4net.Config.DOMConfigurator(Watch=true)]And my web.config looks like this: <log4net&g... |
| 12/13/2004 2:18 AM | DOMConfigurator Attribute |
| Replies: 1 |
Hi Nicko,When I use"[assembly: DOMConfigurator(ConfigFileExtension="config", Watch=true)]"just before the namespace declaration, it says"'log4net.Config.DOMConfigurator': is not an attribute class".Any idea?Best Regards,Sandeep GiriSenior Member TechnicalD.E.Shaw India Software Pvt. Ltd.Hyderabad.DISCLAIMER :"Any views expressed in this message are those of theindividual sender, except where the s... |
| 12/11/2004 8:12 AM | logging to DB2 |
| Replies: 3 |
I've got log4net logging to db2. I thought this could be helpful to someone.Note: The level field was slightly problematic as it was initially 50 varchars, but log4net seems to send the whole string even when larger then 50. It therefore produced a right truncation error.Beyond that the table create, connectionType and connectionString where the only changesThanks It's a great projectMarcCREATE TA... |
| 12/10/2004 5:23 AM | add custom appender separate from log4net dll |
| Replies: 1 |
Hi,I wrote a custom appender, put it in the Appenders folder and recompiled the log4net dll. Is there a better way to do this? I think my custom log4net.dll is causing me problems and compatibility issues.How can I add a new appender and not modify the core dll? Should it go in it's own project somehow? I think this is a general .NET question, and sorry I'm still relatively new.Thanks for your hel... |
| 12/09/2004 11:26 PM | webservice |
| Replies: 1 |
Hello All,I am trying to use log4net in my webservice which is in C#. My question is,what would be the good place for me to initialize and configure log4net, Idon't want to initialize it each time when a web method is called.Any suggestions are more than welcome. All your help is greatly appreciated.Thank you all.Regards,Murali k Maddali.UAI, Inc.Office (256) 705-5191"The price of greatness is res... |
| 12/09/2004 2:44 PM | log4net Serialization |
| Replies: 1 |
Is there anyway I can use log4net in an application that requires serialization?
I have seen people with issues in the past, and I don't really want to serialize the whole Object Graph but are there any good ideas out there?
Dru |
| 12/09/2004 5:02 AM | logging additional fields |
| Replies: 1 |
In regards to the following thread, where can I see the source code for the EventId extension? I can find the example code where it is used, but where is the implementation? I would like to write a similar extension to log4net.Thanks,Simon.From: http://sourceforge.net/mailarchive/message.php?msg_id=7162681-----Original Message-----From: Nicko Cadell <nicko@ne...>RE: ADONetAppender 200... |
| 12/09/2004 2:08 AM | Error using RemotingAppender: can't find assembly log4net |
| Replies: 6 |
Hi, I'm trying to use the RemotingAppender. I got the client and server sample code working fine. Now I'm trying to use the appender in my own code but I'm getting an error that I can't figure out. When I run my own app (acting as the client) I see this stack trace in DebugView:[9596] log4net:ERROR [RemotingAppender] Failed in DoAppend[9596] System.Runtime.Serialization.SerializationException: Can... |
| 12/08/2004 9:24 PM | Exception Logging |
| Replies: 1 |
I am using log4net 1.2.0 beta 8.According to the documentation, the following code:this.logger.Error ( "exception observed!", new Exception("I am an Exception") );should'Log a message object with the ERROR level including the stack trace of the Exception passed as a parameter.'On my logfile, I only find the following text:2004-12-08 15:21:51,171 ERROR FormPoc.Form1_Load[376]exception observed!Exce... |
| 12/08/2004 9:13 PM | Reporting events back to Unit-test |
| Replies: 3 |
HiI am using NUnit and log4net, and I would like to use log4net to reportcertain events back to the unit test.What would be the best way to do this?It seems I can’t generate events and attach to them?It should be possible to inspect to obtain the relevant logger, and inspectit at regular intervals.Also I need to make sure (from unit test at run-time) that what I look foris really logged.One situat... |
| 12/08/2004 8:55 PM | Using RollingFileAppender |
| Replies: 3 |
Is there a way I can configure RollingFileAppender to create a log file perday, append to it if it's the app is run multiple times during that sameday, but overwrite it the following week. Ex: Have Monday.log,Tuesday.log....etc., which show me logged activity for all of that day - onthe following Monday, Tues....they get overwritten.TIA. |
| 12/08/2004 7:38 PM | equivalent of Log4xxx for ASP (not ASP.Net) |
| Replies: 3 |
Greetings all,
Does someone know a framework that can be used in ASP pages to provide "real" logging?
We use Log4Net or Log4J in every "new technology" projects, but have to take back an old ASP 2.0 project. I would like to be able to insert logging with levels and so on...
TIA,
Jérémie.
|
| 12/08/2004 6:37 PM | Finding out whether a specific appender is attached |
| Replies: 3 |
Hey,I have an application that uses another assembly, written earlier, wherea System.Diagnostics was used for debugging output. As the newapplication is supposed to use log4net for logging, I want to route thatold Diagnostics stuff into log4net and I have successfully created myown derived TraceListener that does that for me.Now, on my development system, I like to set up log4net to use aTraceAppe... |
| 12/04/2004 7:45 AM | Log4Net API to get appender config properties |
| Replies: 5 |
Is it possible to access appender properties via the log4Net API. For instance, I am interested in discovering the name of a rollingfileAppender logfile name and path, but because it is dynamically created with respect to time, parsing the log4net config file proves futile. It would appear that I should gain access to the Appenders Collection object, but am uncertain as to how I go abo... |
| 12/03/2004 11:45 PM | Using Socketappender vs SMB share |
| Replies: 1 |
I'm going to catch all ERROR level statements to a central server. I'm currently deciding between using a SocketAppender vs directing a standard file appender to a Windows network share. We don't forsee a need for 1) platform-independence or 2) the ability to customize and extend SocketServer. Are there other reasons a SocketAppender/SocketServer is preferred over the SMB option?... |
| 12/03/2004 5:58 PM | Multiple logs |
| Replies: 3 |
Hi,
I want to generate a log file for every thread in my application. My application is multithread and I want to know which thread does which action.
Today, I’ve only one log file but the log entries are mixed and can’t find which thread is concerned…
Any help is appreciated!
Thanks.
David Grospelier
Chef de projets
Sword - www.sword.fr
|
| 12/03/2004 4:56 PM | Build problem |
| Replies: 1 |
Hi,I downloaded "log4net-1.2.0-beta8.zip" file and tried to compile it with"build.cmd".I had the following error:"LOG4NET_DIR is D:\Formation Projects\log4net-1.2.0-beta8 BUILD_FILE is D:\Formation Projects\log4net-1.2.0-beta8\log4net.build 'D:\Formation' is not recognized as an internal or external command,operable program or batch file."Simply renaming ''formation projects'' to ''forma... |
| 12/03/2004 2:53 AM | Parsing XmlLayout formatted events |
| Replies: 6 |
Hi, I'm using the UdpAppender to send events to another server on our network. I've got Chainsaw working for examining the events in real-time, but have also written my own app to receive the events. The events are sent to the app formatted using XmlLayout. In the app I would now like to parse the event info and insert the details into a database.Is there an easy way to parse XmlLayout-formatted e... |
| 12/02/2004 6:00 AM | RE: CompactRepositorySelector |
| Replies: 2 |
>> P.S. Do you have any 'smart device' Visual Studio project> files lying around for making the netcf build ?>To build log4net for the Compact Framework in Visual Studio:Just create a new C# "Smart Device Application" project.Add all the *.cs source files from the src directory except thefollowing:Appender/ASPNetTraceAppender.csAppender/ColoredConsoleAppender.csAppender/EventLogAppende... |
| 12/01/2004 7:55 AM | ConfigureAndWatch and HttpContext |
| Replies: 1 |
I'm having a problem where ConfigureAndWatch won't craps out when tryingto reload the configuration file after it's been modified. In myglobal.asax.cs file, I have the following:protected void Application_Start(Object sender, EventArgs e){ DOMConfigurator.DOMConfigurator.ConfigureAndWatch(newSystem.IO.FileInfo(Server.MapPath("log4net.config"))); Logger.Info("App... |
| 12/01/2004 4:53 AM | list of conversionPatterns |
| Replies: 3 |
Is there a listing of conversionPatterns, i.e. %m = message.ThanksMarc |
| 11/30/2004 6:46 AM | XML Logs to Datasets |
| Replies: 2 |
Does anybody have a code snip forputting the xml logs into a dataset.I have tried it but keep getting anamespace error. I can't seem tofind a decent article on addingnamespaces to datasets either.Thankstont |
| 11/30/2004 6:05 AM | Re: RE: Log locking with local/remote appender |
| Replies: 0 |
Hi Nicko
Thanks for your response I will investigate
it in the morning.
In my app the logger does not "have" to be
in the server this is just how it happened.
I am testing out log4net for a project I am
working on and did not wa... |
| 11/30/2004 3:16 AM | Documentation update |
| Replies: 3 |
In the documentation for v1.2, the MS SQL Server example forADONetAppender has a misleading table creation script. The table shouldcreate nvarchar columns instead of varchar columns because the DBTypeparameters in the configuration are set to "String". String is a unicode(i.e. nvarchar) format.The table creation script should read:CREATE TABLE [dbo].[Log] (  ... |
| 11/30/2004 12:55 AM | Log locking with local/remote appender |
| Replies: 1 |
Hi GuysI have found an bug when using a RemotingAppenderhosted in the same app domain as the client.The issues seems to be in Logger.csCallAppenders(LoggingEvent loggingEvent)The lock is called on the client and thenagain on the server creating a deadlock.The source to reproduce it is attached and belowand I am using the beta 8. If you require theproject for the code below then drop me a mail.Than... |
| 11/29/2004 6:39 PM | Re: RE : ASP.NET and log4net |
| Replies: 0 |
David rouillon wrote:
>Nicko,
>
>A tried the MySQL connector first with this appender:
>
><appender name="ADONetAppender_MySqlServer"
>type="log4net.Appender.ADONetAppender" >
><bufferSize value="1" />
><param name="ConnectionType"
>value="MySql.Data.MySqlClient.MySqlConnection, MySql.Data"... |
| 11/29/2004 6:02 PM | Can I use PatternLayout for Subject in SMTPAppender? |
| Replies: 1 |
I want to put the level of the errorin to the Subject of the email messagewhich SMTPAppender is sending, like:<param name="Subject" value="Logging -%p" />Is this possible, and then how?-------------------------------------------------------Þetta skeyti er sent með vefposti isl.is |
| 11/27/2004 9:36 PM | DBTypes |
| Replies: 1 |
HiDoes anyone know how I'd create a sql Text type parameter in the configsection for the ado appender: <param name="Parameter"> <param name="ParameterName" value="@freeFormText" />  ... |
| 11/27/2004 5:04 PM | Log timestamp in UTC |
| Replies: 3 |
Does there exist a conversion pattern specifier that logs the timestamp inUTC?_________________________________________________________________Stay in touch with absent friends - get MSN Messengerhttp://www.msn.co.uk/messenger |
| 11/26/2004 10:40 PM | RollingFileAppender does not log to the file |
| Replies: 6 |
Hi,I have a problem with using log4net in an ASP.NET application. The debugoutput of log4net says that it loads the log4net config file correctlyand also opens the log file for reading. But nothing is written to thefile. The debug output is appended to this mail.Any ideas what can be the problem here?RegardsMarco |
| 11/26/2004 10:25 PM | Watching config file changes on netcf |
| Replies: 1 |
I want to modify logging properties during execution on devices running.netcf, over a GPRS connection. I'm aware from the documentation thatwatching changes to the log4net configuration file is not currentlysupported on the .NET Compact Framework.Is anybody else working on this kind of problem (either with their ownworkarounds, or something they would like to commit to the log4netcodebase) ?Any ad... |
| 11/26/2004 6:03 PM | Problems using log4net with ASP.NET |
| Replies: 3 |
Hi there ...
I'm trying to use log4net with one of my asp.net applications. I used log4net for some windows apps already but I have some problems now ... here my env
.net framework 1.1
log4net 1.2.0-beta8
I have the following in my web.config:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="log4net" type="log4ne... |
| 11/26/2004 5:50 PM | ASP.NET and log4net |
| Replies: 2 |
Hi there ... I'm trying to use log4net with one of my asp.net applications. I used log4net for some windows apps already but I have some problems now ... here my env .net framework 1.1 log4net 1.2.0-beta8 I have the following in my web.config: <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="log4n... |
| 11/26/2004 6:42 AM | RoolingFileAppender constant file extensions |
| Replies: 2 |
Windows file utilities use a file's extension (text after the last "." inthe name) to determine its type. File names generated by theRollingFileAppender seem to have a sequence number or date as the last textin the name. Is there a way to configure the RollingFileAppender so that thegenerated file name's extension are constant (e.g., .log) and thedate/sequence fields are before the final "."... |
| 11/26/2004 6:05 AM | ado.net and MySQL |
| Replies: 1 |
hi,Is it possible to connect to a MySQL database?I have installed the MySQL Connector/Net 1.0 component, and I tried to create an appender with this parameter:<appender name="ADONetAppender_MySQL" type="log4net.Appender.ADONetAppender"><connectionType value="MySql.Data.MySqlClient" /><...but it doesn't work.Is there someone how has some experience with ado.net appender on MySQL data... |
| 11/24/2004 11:31 PM | RollingFileAppender ASP.NET |
| Replies: 1 |
I´m having problems with the RollingFileAppender when i´ve deployed myapplication to the live server, i can´t get it to work.This is my web.config<configSections> <section name="log4net"type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /></configSections><log4net> <appender name="RollingFileAppender"type="log4net.Appender.RollingFi... |
| 11/24/2004 10:38 PM | Ability to use tilda (or relative path) when specifing output file in config file for ASP.Net logging |
| Replies: 6 |
On my dev machine, I have several appenders that write to various logfiles:<param name="File"value="C:\\Inetpub\\wwwroot\\testsite\\Data\\Logs\\log.txt" />When I move this to a different server, the file path won't always beC:\inetpub\wwwroot\testsite... Is there a way I can use a relative pathon the param tag or on the log4net tag?<param name="File" value="~/Data/Logs/log.txt" /><l... |
| 11/24/2004 3:24 AM | LogicalThreadContext vs ThreadContext |
| Replies: 3 |
I'm a little confused as to the difference between LogicalThreadContext and ThreadContext. Can someone explain the difference? LogicalThreadContext says it is for CallContext debugging. What is a CallContext, is that a method call? I would expect the values I set in a method using LogicalThreadContext to go out of scope when the execution leaves that method but it does not.... |
| 11/23/2004 12:17 AM | test |
| Replies: 3 |
test**********************************************************************This email and any files transmitted with it are confidential andintended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notifythe system manager at postmaster at dor.state.ma.us.************************************************************... |
| 11/22/2004 10:38 PM | Custom Appender |
| Replies: 5 |
HiI need to send in XML data which I then break up and store in a database - any ideas as to the best way to do this?I'm looking to create a custom appender, similar to the current ADONet appender by extending the AppenderSkeleton class, and implementing the Append method.The trouble is, I'm a little confused when it comes to the LoggingEvent class - am I right in thinking that I'll have to create... |
| 11/20/2004 6:24 PM | [1.1.1] No appenders could be found for category |
| Replies: 3 |
I keep getting this error over and over :(A search throuth the web brought up similar issues but no solutions.My story:I startet developing .net stuff only days ago. I start to work on asmall vb.net web app. A colleague supplied me with the log4net dll andsome sample code and config he is using in his projects.Logging works for him on his machine but not for me on my machine :(Compared everything ... |
| 11/19/2004 7:54 PM | Change Loglevel by code |
| Replies: 1 |
Is it possible to change the level in root at runtime programmaticallyor is the only way to set the level through the log.config?ThanksMarcel |
| 11/19/2004 5:32 PM | log4net and .NET/COM Interop |
| Replies: 1 |
I have written a .NET Class library (a WS-Security based web-service proxyclient), which is invokable via .NET Interop from ASP 2.0 Classic. TheClass library is1) registered to GAC2) type library registered using regasm /tlbIt has all been working fine until I added a single line of log4net code! private static readonly log4net.ILog log =log4net.LogManager.GetLogger("Order"... |
| 11/19/2004 2:15 PM | OT: Easy C# Help |
| Replies: 3 |
I want to do thisresult[i] = System.Convert.ToChar(character);How do I do it?I am a vb guy and I am used to usingMid(RandomString, i, 1) = characterThanks,Dru---Outgoing mail is certified Virus Free.Checked by AVG anti-virus system (http://www.grisoft.com).Version: 6.0.797 / Virus Database: 541 - Release Date: 11/15/2004 |
| 11/19/2004 4:00 AM | dynamically get config filename |
| Replies: 2 |
I would like to dynamically determine the log4net config filename. I tried log4net.helpers.SystemInfo.ConfigurationFileLocation (seen in DOMConfigurator.cs) but it gives me the wrong info. It gives me "web.config", but I'm using "<assemblyname>.dll.log4net" as the config filename.I have this code in my Global.asax.cs:[assembly: log4net.Config.DOMConfigurator(ConfigFileExtension="log4net", Wa... |
| 11/19/2004 3:24 AM | DomConfigurator error and Assembly woes |
| Replies: 1 |
My application runs in .Net1.1SP1 as a consoleapplication project with aseparate classlibrary project.I would like to instantiate a logger in each of 2 classes in theclasslibrary. The classlibrary has a reference to the log4net.dll inanother library folder. A sample class1.vb looks like (and class2.vblooks strikingly similar):Public Class Class1 Private ReadOnly log As log4... |
| 11/18/2004 11:02 PM | Rolling file appender.. unable to log to a different directory than the AppDomain.CurrentDomain.BaseDirectory |
| Replies: 1 |
Hi, I have a problem with the rolling file appender if I am to specify the full path for the log file such as '\my folder\log.txt" it will create a file called '\my folder\log.txt".
The problem as far as I can see it lies in the code which combines the filename on set filename with the AppDomain.CurrentDomain.BaseDirectory
To resolve my problem with it I have added one line of code into the Co... |
| 11/18/2004 10:27 PM | PatternLayout Question |
| Replies: 6 |
Hi,
I’ve tried to find an answer to my question on the web but no avail. The thing I’d like to do is having the date and time values on the “Header” part of the layout. As you can see from the following code, [%t] won’t produce anything as one might think that it should’ve worked as same as “ConversionPattern” value.
Is the output I am trying to have actually possible?
... |
| 11/18/2004 8:54 PM | Contributing a telnet appender for log4net |
| Replies: 1 |
Hello, I would like to contribute this telnet appender for log4net, this telnet appender is a direct port of the telnet appender
available for log4j. I have really tried to avoid making un-neccesary changes with-in this port to avoid any problems or bugs which may arise.
I'm using this file appender within the Compact Framework and with standard C# enviroment and it works fine. If you have any... |
| 11/18/2004 8:24 AM | SMTPAppender |
| Replies: 8 |
Can I add more than one email address? If so what is the structure of the config?
Thank you,
Stephen |
| 11/18/2004 2:20 AM | How to dynamically setup logging |
| Replies: 1 |
I have an application that may or may not want to log using theRollingFileAppender. I have many places that call GetLogger. It appearsthat if a call to GetLogger is done before the appended is added to thecollection (Hierarchy->Root->AddAppender(the_new_appender) that the loggerthat is returned from the GetLogger call does not log to that appender.I guess that the above is reason... |
| 11/18/2004 2:13 AM | DOMConfigurator.Configure() |
| Replies: 5 |
I bet this question gets asked a lot. But I'm not finding anything inthe archives. It's probably cuz I suck.Anyway,If there any way to set log4net up so that you do NOT have to callDOMConfigurator.Configure() before the logging goodness statshappening?Or is this a pipe dream?I'm using the .net 1.0 version at the moment.--Thomas G. Willishttp://paperbackmusic.net |
| 11/18/2004 1:56 AM | File logging issues with website |
| Replies: 4 |
I’ve used log4net in quite a few windows services and forms projects but not a .Net website, and am experiencing problems writing to a file with this appender. Can someone help point me in the right direction?
Thank you,
Stephen
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
 ... |
| 11/17/2004 6:40 PM | ERROR: No appender named [A] could be found |
| Replies: 3 |
I have downloaded Log4net 1.1.1 athttp://prdownloads.sourceforge.net/log4net/log4net_1_1_1.zip?use_mirror=ovhI can't even get the TestApp example working (I have stripped it down andstill no joy!). I note that the sample app does not have a config file inthere. So here is what I did1) Extracted zip file to c:\2) Add reference to c:\ c:\log4net_1_1_1\bin\log4net.dll to the VisualStudio ... |
| 11/17/2004 8:55 AM | Easy Question |
| Replies: 2 |
Why would you write
If log.IsInfoEnabled Then log.Info("result=[" & result & "]")
over
log.Info("result=[" & result & "]")
Dru |
| 11/16/2004 11:41 PM | RollingFileAppender per execution rolling? |
| Replies: 1 |
Does anyone know if there is a way to configure a rolling file appender such that:
1) The current execution always uses the file xxxx.log
2) Each time the application is run xxxx.log gets names xxxx.log.N where N is the next free number
From looking over the documentation, it looks like this is possible, but I've tried a couple of configurations and can't seem to get it to work.
... |
| 11/16/2004 11:39 PM | Logging Perf Hit |
| Replies: 6 |
In my ASP.Net pages I am doing this in about every method
log4net.Config.DOMConfigurator.Configure(New IO.FileInfo(file))Dim log As log4net.ILog = log4net.LogManager.GetLogger(GetType(Verify))Do I need to do this all the time or is there a way to work around this?
Dru |
| 11/16/2004 8:39 PM | RE: appenders Serializable |
| Replies: 0 |
>
> Does anyone know if marking the appenders as Serializable
> would break anything?
>
This depends on the appender you are trying to serialise and what state
it is storing. References to thinks like file streams don't serialise.
In general I don't think that appenders expect to be serialized by
value, i.e. where the internal state of the member variables is stored
a... |
| 11/16/2004 5:21 AM | Poll: mission-critical use of log4net |
| Replies: 4 |
On a previous thread the issue of log4net's fitness-of-purpose for more mission-critical logging came up. As you may know, log4net makes no claim to reliability, only to being a fail-stop (near-silent fail) logging system.
Nonetheless, it is a very clean, usable, and easily configurable logging application that, even for the declared risk, is a very attractive option for more sensit... |
| 11/15/2004 10:40 PM | SysLog appender |
| Replies: 1 |
Hello,I begin to work with Log4Net. A wonderful toy ;o)Even if i work on Windows Server environment, i would like to appendlogs in syslog format but i do not found anything about this.Is such a projet starts for Log4Net ?If not, i think i'll spent some hours to write it.Thanks a lot for your help,Regards,Antoine--a day a bug |
| 11/11/2004 2:31 PM | Antwort: RE: Problem with RollingFileAppender when restarting application |
| Replies: 0 |
That's correct. I allready tried this option and it works fine, but my
intention is to start application with a new logfile combined with rolling
as specified.
Magdalena
|---------+---------------------------->
| | "Senthil &nbs... |
| 11/11/2004 5:03 AM | can one use >1 appender and to have "fail-over" logging |
| Replies: 6 |
**********************************************************************This email and any files transmitted with it are confidential andintended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notifythe system manager at postmaster at dor.state.ma.us.**************************************************************... |
| 11/11/2004 4:23 AM | Is "2003-07-15 16:00 1.2.0 Beta8" really the latest-and-greatest |
| Replies: 4 |
**********************************************************************This email and any files transmitted with it are confidential andintended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notifythe system manager at postmaster at dor.state.ma.us.**************************************************************... |
| 11/11/2004 3:52 AM | Chainsaw and log4net |
| Replies: 3 |
I'm trying to get log4net to communicate with Chainsaw using the UdpAppender. I have everything working successfully except for the fact that the Class, Method, File and Line columns in Chainsaw show up empty.Here is the appender config code I'm using:<!-- UDP Appender will be used to send events to an IP:port for Chainsaw to listen on. --><appender name="UdpAppender" type="log4net.Append... |
| 11/11/2004 2:47 AM | DomConfigurator exception? |
| Replies: 8 |
Anyone know why doesn't log4net.Config.DOMConfigurator.Configure throw an exception if there is a problem in the config file?
Benjamin Peikes Gargoyle Strategic Investments 201-227-2209
|
| 11/11/2004 2:32 AM | Access is denied: 'log4net' |
| Replies: 8 |
HI, I am using log4net in my web application. It works fine in my local development machine.
But after I deployed to a host server, log4net can not be loaded when a page referring to it has been called. I got this error shown as below. This hosting server is paid shared one. Any clues?
Thanks,
Linda
Server Error in '/' Application.
Access is denied: 'log4net'.
Descr... |
| 11/10/2004 10:08 PM | IObjectRenderer and ADONetAppender |
| Replies: 1 |
Hello,I want to log data from a custom object into the ADONetAppender. From thedocumentation I understand that I will need an object renderer but how do Iuse my object renderer with the ADONetAppender? This question may come fromnot understand how IObjectRenderer relates to layout.Thanks,Joshua |
| 11/10/2004 6:07 PM | RE: Problem with RollingFileAppender when restarting application |
| Replies: 2 |
I believe you should set the "appendToFile" flag to True in the configif you want the current contents of the log file not to be erased atstartup of the App:<appendToFile value="true"/>-Senthil SS. |
| 11/10/2004 5:59 AM | Extending log4net with new appenders |
| Replies: 1 |
Greetings,I am using log4net 1.2beta8 against .net 1.1, developing in vs.net 2003 ...I am trying to extend log4net with a custom appender. I took aMsgBoxAppender class that was posted here or at the dev list and used itas the basis for my appender. I added the new class to my consoleapplication (the one that I am logging) and compiled the app with noproblems.However, when I run the app... |
| 11/10/2004 12:34 AM | Use of backslash in file paths |
| Replies: 4 |
Log4Net 1.2.0 Beta 8 doesn't seem to like backslashes in filenames - e.g.the following example results in output to "logTrace.log" instead of"log\Trace.log":<appender name="DefaultAppender"type="log4net.Appender.RollingFileAppender"> <file value="log\Trace.log" /></appender>Is this a bug? I can workaround by using a forward slash or... |
| 11/09/2004 7:42 PM | Adding a new field to the layout |
| Replies: 1 |
Is there an example of adding new fields to the layout?I would like to add fields such as internal error number,application name, module name, etc.Thanks,Dave_________________________________________________________________On the road to retirement? Check out MSN Life Events for advice on how toget there! http://lifeevents.msn.com/category.aspx?cid=Retirement |
| 11/08/2004 10:56 PM | Named layouts |
| Replies: 2 |
Does anyone know if there is a way to define a layout, and then reuse the layout in more than one appender?
For instance I would love to be able to do something like this:
<layout name="reusable" type="log4net.Layout.PatternLayout">
<param name="%d{yyyMMdd:HHmmss.fffff} [%t] %-5p %c %x - %m%n" />
</layout>
<appender name="Debug" type="log4net.Appender... |
| 11/08/2004 8:42 PM | Logger: |
| Replies: 1 |
public class Calculate { private static readonly ILog log = LogManager.GetLogger(typeof(Calculate));
Here instead of hardcoding class name ,is there a way where name can be obtained a... |
| 11/05/2004 9:25 PM | RollingFileAppender losing entries from midnight to noon? |
| Replies: 1 |
I'm having a problem with the RollingFileAppender. Our application isa Windows Service using the following log config file:<?xml version="1.0" encoding="utf-8" ?><log4net> <appender name="MainLogFile" type="log4net.Appender.RollingFileAppender"> <param name="File" value="application_" /> &nb... |
| 11/04/2004 6:30 AM | Versions |
| Replies: 2 |
Hi,I have a quick question, is "1.2.0 Beta8" (release date 2003-07-15) found on SourceForge thelatest and greatest version? If there is a newer version, where can it be found?Thanks in advance.Richard Thurston __________________________________Do you Yahoo!?Check out the new Yahoo! Front Page.www.yahoo.com |
| 11/03/2004 11:15 PM | Ilog is not Serializable |
| Replies: 4 |
Hi,
I want to use Log4Net component in Biztalk 2004 Server Orchestrations. Biztalk gave me the ability to call .Net components but they must be “Serializable” and ILog is not.
I use the 1.2.0.30714 release for .Net framework 1.1.
Thank you for help and sorry for my sad English….
David Grospelier
Chef de projets
Sword - www.sword.fr
|
| 10/30/2004 4:33 AM | Setting ADONetAppender.ConnectionString at runtime |
| Replies: 1 |
In our asp.net application we are base64encoding all ado.net connection strings so that database usernames and passwords are not available anywhere as clear text. Since we also rely on the ADONetAppender for logging I need a way to set this connection string at runtime instead of relying on <param name="ConnectionType" value="..."> in web.config. Any thoughts? |
| 10/28/2004 9:55 PM | Changing Database Structure |
| Replies: 1 |
Hello,
I’m working with Log4Net 1.2.0 Beta8 under .NET Framework using SQL Server database to log through ADONETAppender.
I would like to add more fields to the log table I created from the sample because I have more information to log.
Which steps should I follow to accomplish this?
Is there any tutorial or guide about this?Thanks,
Alejandro |
| 10/28/2004 2:55 PM | FileAppender share reading |
| Replies: 1 |
Hi.I am using log4net 1.2.0-beta8.I use FileAppender to log into file. The problem arrives when I try to readlog file in order to show log entries.As I discovered from source, log4net usesnew StreamWriter(string fileName, bool append, encoding)call to open the file.Is it possible to usenew StreamWriter(new FileStream(fileName, append ? FileMode.Append :FileMode.Create, FileAccess.ReadWrite, FileSh... |
| 10/27/2004 9:53 PM | Incubation Period |
| Replies: 0 |
How long is the project expected to be in an incubation period? Will therebe an updated roadmap or development status released?Matthew Griffore |
| 10/27/2004 9:10 PM | RollingFileAppender question |
| Replies: 5 |
I have the following configuration for a RollingFileAppender, but it's notworking as (I) expected:<appender name="RollingFileAppender"type="log4net.Appender.RollingFileAppender"> <file value="cdtimer.log" /> <appendToFile value="true" /> <rollingStyle v... |
| 10/27/2004 8:26 PM | OpenSource |
| Replies: 0 |
Hi people
Has anyone added to log4net source code…. Like in CustomRenderes people like thibaut have added DictionaryRenderer
Credit:Thibaut Barrère I have attached the file:which anyone can add to log4net source
<<DictionaryRenderer.cs>> MASTEK"Making a valuable difference"Mastek in NASSCOM's 'India Top 20' Software Service Exporters List.In the US, we're called MAJESCO~~~~~~~~~~... |
| 10/27/2004 4:18 PM | Re: Please Can u bail me out!!! |
| Replies: 0 |
Hi Amit
> 1)As specified I added DictinoryRenderer.cs class in log4net src
actually it's not necessary to do this; your DictionaryRenderer can be
just part of your own application assemblies. This avoid to recompile
log4net.
> 2)config settings :<renderer renderingClass="log4net.ObjectRenderer.DictionaryRenderer"></renderer>
see here : http://logging... |
| 10/27/2004 1:51 PM | Query |
| Replies: 1 |
Can anyone explain what the attribute renderedClass mean ?????
I am unable to execute the same >>>>
<renderer renderingClass="log4net.ObjectRenderer.DefaultRenderer" renderedClass="?"></renderer> MASTEK"Making a valuable difference"Mastek in NASSCOM's 'India Top 20' Software Service Exporters List.In the US, we're called MAJESCO~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... |
| 10/27/2004 2:31 AM | basic issue: problem getting log output from my NUnit tested assemblies.... |
| Replies: 3 |
Hi all,
I'm have a problem getting log4net output (using NUnit & dynamically loaded assemblies).
Can someone please offer me a list of steps to check? (before I need to spend time debugging it?). Thanks!
********************************************
I turned on log4net internal logging using the appSetting’s key, and it shows that log... |
| 10/26/2004 8:31 PM | Re:ConfigSettings For ObjectRenderer |
| Replies: 2 |
Hi, Can anyone provide the config settings for object renderer….!!
Thanks and Regards, Amit .M. Agarwal MASTEK"Making a valuable difference"Mastek in NASSCOM's 'India Top 20' Software Service Exporters List.In the US, we're called MAJESCO~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Opinions expressed in this e-mail are those of the... |
| 10/26/2004 7:23 PM | RemotingAppender |
| Replies: 2 |
Do u have any documentation on RemotingAppender?
Regards
DeepaliMASTEK"Making a valuable difference"Mastek in NASSCOM's 'India Top 20' Software Service Exporters List.In the US, we're called MAJESCO~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Opinions expressed in this e-mail are those of the individual an... |
| 10/26/2004 4:37 AM | Question about the DomainAttribute |
| Replies: 3 |
Hello,
I have a question on using the DomainAttribute attribute. What I would like to know is if I use the Attribute in an assembly file, then when I call from a class in the assembly do I also need to specify the domain in the log statement? Such as log.Debug(“MyDomain”, “Statement”) or does the fact that I have tagged that attribute, allow for me to log the old fashioned wa... |
| 10/25/2004 1:57 PM | Object Renderer |
| Replies: 6 |
Hi,
How to use the Custom ObjectRenderer? Please provide me the documentation with example
Regards
DeepaliMASTEK"Making a valuable difference"Mastek in NASSCOM's 'India Top 20' Software Service Exporters List.In the US, we're called MAJESCO~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Opinions expres... |
| 10/23/2004 11:37 PM | FileAppender with MaximumFileSize |
| Replies: 1 |
Hello everyone,I have searched through the web but I can't find a reference aboutusing attribute MaximumFileSize in combination with FileAppender.It's legitimate to use MaximumFileSize with FileAppender, in the first place?If no, is there any way to limit the output of log file generated byFileAppender, or should I use RollingFileAppender?I just want to limit the size of log, and when file fills u... |
| 10/23/2004 10:07 AM | Implementing complex message logging objects |
| Replies: 3 |
Hello,I am trying to use log4net to store arbitrary complex data objects.For example, i have sensor data that i would like to output to bothXML and database storage. I would like to implement it in the mostgeneralized way possible to be of use to others in the community.Example:class DataObject { string strData; int intData;}When logging to an XML file, the object should be outputted i... |
| 10/23/2004 4:42 AM | Set SMTPAppender to use IIS SMTP services |
| Replies: 1 |
Hi,I use log4net to log errors for a .NET web application, and send email via SMTPappender using IIS SMTP services. It works fine during development. After I deployed to the server using web setup, the log emails are not sending out.The SMTPhost is set as the computer name of the server. I have tested IIS SMTP services using system.web.mail and set SMTPserver either as the computer name or blank... |
| 10/22/2004 6:23 AM | basic question on building log4net |
| Replies: 1 |
Hello,I have a basic question on building log4net. I'm running Win2k, SP2,.Net 1.1, VS .Net 2003.I build log4net via: nant compile-net-1.1 /f:log4net.buildThe stdout says it's doing .Net 1.1 but log4net.dll is built to (1.0directory): log4net\log4net-1.2.0-beta8\bin\net\1.0\debug ... |
| 10/21/2004 8:50 PM | FileAppender Thread Safe!!! |
| Replies: 1 |
In case of writing to file ,when two clients write at the same time , Client1 log is it handled ?
Thanks and Regards, Amit .M. Agarwal MASTEK"Making a valuable difference"Mastek in NASSCOM's 'India Top 20' Software Service Exporters List.In the US, we're called MAJESCO~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Opinions expressed ... |
| 10/21/2004 8:47 PM | Conditional appenders!! |
| Replies: 4 |
Is it possible that for this level say fatal I want only email appender ro be sent For level error I want to write only to file….. That is conditional selection of appenders.
Thanks and Regards, Amit .M. Agarwal MASTEK"Making a valuable difference"Mastek in NASSCOM's 'India Top 20' Software Service Exporters List.In the US, we're called MAJESCO~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... |
| 10/21/2004 8:43 PM | Rolling file appender : |
| Replies: 1 |
In case of Rolling file appender : I want to customize the name of the file say from log.txt.1 which is default to say AllAppMessages[1].log.Here [1] should be dynamic next should be [2],[3] …..
Thanks and Regards, Amit .M. Agarwal MASTEK"Making a valuable difference"Mastek in NASSCOM's 'India Top 20' Software Service Exporters List.In the US, we're called MAJESCO~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... |
| 10/21/2004 8:38 PM | Query Please? |
| Replies: 1 |
I want to reload the config settings automatically,as and when it changes……without app restart!!!!!! Thanks and Regards, Amit .M. Agarwal MASTEK"Making a valuable difference"Mastek in NASSCOM's 'India Top 20' Software Service Exporters List.In the US, we're called MAJESCO~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Opinions express... |
| 10/21/2004 8:36 PM | rhfg |
| Replies: 0 |
MASTEK
"Making a valuable difference"
Mastek in NASSCOM's 'India Top 20' Software Service Exporters List.
In the US, we're called MAJESCO
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Opinions expressed in this e-mail are those of the individual and not that of Mastek Limited, unless specifically indicated to that ... |
| 10/21/2004 5:35 AM | Performance of buffered vs. non-buffered logging |
| Replies: 1 |
I've been running some performance tests today on using the log4net ADONetAppender. I have a simple ASP.NET page that does one log request, and I'm using ACT to hit this page with 50, 100, 150, 200, 300 and 400 users with a 5-10 second random delay between each request.I did one set of tests with a bufferSize of 1 and another set of tests with a bufferSize of 50. Surprisingly the first set of test... |
| 10/20/2004 4:58 AM | How can I log to database through firewall? |
| Replies: 3 |
Hi, I want to log events in my web app to SQL Server, but there is a firewall between the database and the web server where I'm logging from.What options do I have for sending events through the firewall to another server which could in turn log the events to the database? Do I use the RemotingAppender? The UdpAppender? Something else?In thread titled "ASP.NET Web Service to wrap Log4Net", Eric Se... |
| 10/20/2004 2:38 AM | TextBoxAppender |
| Replies: 10 |
I'd like to have log4net append messages to a TextBox control. I have subclassed AppenderSkeleton into a TextBoxAppender class, but don't know how to pass it an instance of TextBox to append to.
I found this same question posted on the old sourceforge list with no responses, so I'm asking again. (If anyone has examples of doing similar things with other controls I could just work from there... |
| 10/20/2004 12:50 AM | UDPReceiver |
| Replies: 1 |
I have a question regarding the reply below: Since UDPReceiver for log4j is not available until log4j v1.3 alpha (not released yet). Does that mean I can not send log4net events to a log4j receiver at this time (unless I write my own UDPReceiver)?
Thank you very much,
Anh Nguyen
Software Engineer
Printrak Motorola
(888) 488-4140 X2217
--------------------------------------------------... |
| 10/19/2004 11:19 PM | SourceSafe.Interop, or one of its dependencies, was not found |
| Replies: 2 |
Hello All,I am trying to use the vss task from nant contrib. My target is below:<target name="vss" depends="init"> <vssget user="user" password="password" localpath="${framework.SourceDir}" recursive="true"  ... |
| 10/19/2004 10:18 PM | Problems upgrading to version 1.2 from 1.1 |
| Replies: 3 |
I am trying to upgrade to log4net 1.2 beta from 1.1. One huge thing thatchanged is that the Category class has been made internal. I have somequestions about how to port code because of this.I have changed my variables of type "Category" to "ILog" and the creation ofthem to LogManger.GetLogger().However, one of the things I need to do is switch the Appender being used.What I used to call is Catego... |
| 10/15/2004 4:18 PM | Calling target depending on current .NET version |
| Replies: 2 |
HiI'm using the same build xml to build a project for .NET Framework 1.0 and1.1.I control the .NET version with the following properties:<property name="version.net.framework" value="1.1" /><property name="nant.settings.currentframework"value="net-${version.net.framework}"/>Now, I need to call a target only when .NET version 1.0 is active. Doesthere exists a property which is only se... |
| 10/14/2004 6:50 PM | Appender Levels - Continued |
| Replies: 1 |
Nicko,
I understand what you are saying. However, when I used the code snipet you
offered (included in my earlier e-mail), it didn't find the appender. The
appender variable was null after executing the code snipnet:
log4net.Appender.AppenderSkeleton appender =
(log4net.Appender.AppenderSkeleton)logger.GetAppender("myAppender");
where logger was a valid&nb... |
| 10/14/2004 2:58 PM | WMI support / WMI appender for log4net |
| Replies: 1 |
Hi,Is it possible to log WMI event using log4net?If there is any sample, will you give a link or sendit to me? We are evaluating logging tools to be usedfor our project. But for that I need to firstly checkout log4net integration with WMI event logging.Thanks and regardsSudhir Kirloskar________________________________________________________________________Yahoo! Messenger - Communicate instantly.... |
| 10/13/2004 11:58 PM | Appender Levels |
| Replies: 3 |
Nicko,Sorry to keep being a pest, but I tried the code snipet you sent in theprevious entry and it doesn't seem to work. The appender does not get setto anything, so the appender.Threshold = Level.Off will generate an exception.Here is the code you sent ...log4net.Repository.Hierarchy.Logger logger =((log4net.Repository.Hierarchy.Logger)log4net.LogManager.GetLogger("foo").Logger);log4net.A... |
| 10/13/2004 11:49 PM | How to log to the same Log instance from multiple classes |
| Replies: 3 |
Hi,I don't know if the subject makes really clear what I want.I want to configure log4net only once, usually this way:this.log= LogManager.GetLogger(typeof(MyClass)); log4net.Config.DOMConfigurator.Configure(newSystem.IO.FileInfo("log4net.xml"));Now I want to log from othe... |
| 10/13/2004 2:28 AM | UDP Appenders |
| Replies: 1 |
Any reason why a write lock would be necessary on UDP appender output? Iunderstand the need for "file" based output, but when writing to a portwith UDP (not guaranteed delivery), why not let multiple appendersget/write/release the port as they need it? This could then provide amechanism by which multiple processes (with different appenders) couldwrite to the same listening client on ... |
| 10/12/2004 11:55 PM | Adapter from legacy c++ code to log4net |
| Replies: 0 |
(this is a repost, the topic was wrong, sorry!)Hi all,I wrote a very basic mixed-mod (managed/unmanaged) adapter betweensome internal legacy trace mechanism and log4net, to be able to haveall the "legacy trace" inside log4net logs.It's not a very interesting code and really easy to do, but I wasasked for this two times already, so if anyone has the need for that,drop a line (thibaut dot barrere at... |
| 10/12/2004 7:43 PM | Can I write my own appender |
| Replies: 7 |
Hi !!
I might be trowing some odd questions in here.. but what I want to know is can I write my own appender. This is because I already have a Management Console in place in the system. I want to append all my messages (whatever, error, fatal errors, warnings, infos and debug infos) all in the the Management Console.. so that managing those logged informations will be much easier.
Can anyone t... |
| 10/12/2004 1:08 AM | Rename log levels display names |
| Replies: 2 |
Is there a mechanism by which I can rename the log levels that aredisplayed (FATAL, ERROR, WARNING, INFO, DEBUG) in the log files? I do notneed to change their names within log4net, just their string names thatare written to the output log files, etc. I would like to use sting namessuch as "USER", "SERVICE" and "DEVELOPER". Using level names such as FATALand ERROR in the ... |
| 10/11/2004 5:55 PM | FileAppender path |
| Replies: 1 |
Hi,
Using the FileAppender (or subclass of) is it possible to specify the user’s [Application Data] folder for the file output directory. Baring in mind that this path will change depending on the user logged on, i.e. C:\Documents and Settings\<USER NAME>\Application Data.
I’m using log4net v 1.2.0 beta 8 on .NET 1.1.
Thanks for your help
Graham
|
| 10/09/2004 5:16 AM | ODP - ADO.Net Appender - Clob |
| Replies: 0 |
Hi,
Quick question! Did anyone use Clob/Blob DbType and Oracle Data Provider through ADO.Net appender?
Regards,
KR.The information transmitted is intended only for the person or entity to which it is addressed and may contain CONFIDENTIAL material. If you receive this material/information in error, please contact the sender and delete or destroy the material/information. |
| 10/09/2004 4:45 AM | ConversionPattern for PatternLayout |
| Replies: 1 |
Where can I get the docs for the conversion pattern?
I search & googled but I can’t find anything concrete, I mean some sort of table that explains what each thingie does. |
| 10/09/2004 2:50 AM | Problem configuring |
| Replies: 0 |
In short, I can’t log4net to do the logging.
I do:
private ILog logger = LogManager.GetLogger(typeof (VisibleObjectContainer));
public VisibleObjectContainer(Type type)
{
Utility.CheckArgsNotNull(type);
&nb... |
| 10/08/2004 1:26 PM | configuration for RollingFileAppender |
| Replies: 1 |
I have configured Rolling File Appender for writing the events to locallog file. <appender name="RollingFileAppender"type="log4net.Appender.RollingFileAppender"> <param name="File" value="/home/sgoyal/localFile.txt" /> <param name="appendToFile" value="true" ... |
| 10/08/2004 2:29 AM | reading the memoryappender |
| Replies: 2 |
hi, i configured the memory appender in my app.config file. I alsoinstantiate an ILog and write log messages to it. however, i'm notsure how to read the in-memory content from my code. can i please geta small example of this?thanx, amir |
| 10/06/2004 11:15 PM | Email subject for SmtpAppender |
| Replies: 2 |
I am using the SmtpAppender. Is there a way to pass arguments into the"subject" parameter? Ideally I'd like the timestamp and servername inthe subject of the email. I guess the question boils down to can layoutpatterns be used for things other than log messages? |
| 10/06/2004 9:04 PM | Does log4net start its own thread ? |
| Replies: 4 |
Hi,while trying to put a name on all (numerous) threads in an applicationfor better diagnostic, I realized that log4net appears to start itsown thread (for all internal work I suppose). I could not find anytrace of that in the documentation / faq / lists, so I maybe wrong(code below).Does log4net start a thread on the first LogManager.GetLogger call ?If it is, it appears that its Name property is ... |
| 10/06/2004 8:43 AM | AOP based logging. |
| Replies: 1 |
I know that I remember reading a thread a month or so ago about using Attributes and an AOP based type of system for logging. I just came across this article and thought I would post it here for you to see:
http://www.codeproject.com/csharp/AspectIntercept.asp?mode=all&userid=565680&select=938809&df=100&forumid=114281&exp=0#xx938809xx
Rich Deni... |
| 10/05/2004 9:28 PM | ASP.NET Web Service to wrap Log4Net |
| Replies: 4 |
Hi All !!
Can anybody tell me if I can wrap the Log4Net with a ASP.NET web service. So that all other web applications can refer to the web service in order to use the Log4Net. In that case where do I store the Log4Net configurations ? is it in the web.config of the web service ?
Thanks,
Dipankar Basak HBOS Plc Halifax, UK |
| 10/05/2004 3:22 PM | Where to find log when log4net fails(ASP.NET) |
| Replies: 3 |
Hi,
We are using log4net for logging different asp.net applications. Does log4net writes an error message when it is not able to write to its log? e.g. destination is readonly or disk is full.
It should write to "System.Console.Error". Where do i find this, or do i have to redirect it?
Thanks
Richard
Met vriendelijke groet, ABZ Nederland BV R. Knoop Systeemontwikkelaar
Postbus 124, 3700... |
| 10/02/2004 5:15 AM | asynchronous logging? |
| Replies: 6 |
Hi, has anyone tried and found a benefit to doing asynchronous logging to something such as MSMQ? I currently plan to log to SQL Server but wondered if somehow doing it asynchronously would yield better performance. It doesn't seem like log4net has an MSMQ appender so that will be another challenge.Comments anyone?Simon. |
| 10/02/2004 1:47 AM | Has anyone written a MessageBoxAppender? |
| Replies: 2 |
I was wondering if anyone had written an appender for MessgeBoxes.You could have debug messages pop up when you are developing but write tofile when in production. This way you don't have to keep opening andclosing the log file all the time.I was going to write one but I thought I'd check first.Tom Padilla |
| 10/01/2004 9:43 PM | Log files thread release |
| Replies: 5 |
I´m using the latest version of log4net, with MS .NET Window Aplication, that is always running. I need one time every day to backup the log files from older days, but i can´t do it, because all the files are being used by the aplication ( System.IO.IOException - The process cannot access the file because it is being used by another process. ) when trying to move the old files to a backup director... |
| 09/30/2004 4:34 AM | Windows Event Tracing |
| Replies: 4 |
I had my first look at log4net today, and it doesn't look like any of theloggers write to the Windows Event Tracing service. I searched the listarchives for "Windows Event Tracing" and got zero hits.Are there plans to have a logger over WET, or is there some architecturalreason why it's not under consideration?Thanks!Keith |
| 09/29/2004 11:49 AM | Configuration of various appenders using DomConfigurator |
| Replies: 3 |
One small behaviour of log4net i want to understandWhat happens if the following calls happen in succession: DOMConfigurator.configure("File1"); DOMConfigurator.configureAndWatch("File2"); DOMConfigurator.configure("File3"); DOMConfigurator.configureAndWatch("File4");Do the appenders mentioned in each file get "appended" to each other(or do the values get over-ridden by the val... |
| 09/29/2004 7:49 AM | Using an appender from a different assembly - Can you? |
| Replies: 1 |
Hi,Due to my companies rules, I need to have any component thatcommunicates to a DB run under COM+. I don't want to have all of Log4Netrunning under COM+ so I thought I might just move the ADONETAppender outto itself own assembly. I tried to do this and update the "type"attribute in the config file but this has not worked.Before I go too much further, has anyone tried this or can anyonesuggest a... |
| 09/29/2004 5:03 AM | SQL Server appender help |
| Replies: 6 |
Hi, I'm trying to get the SQL Server appender working for log4net. I have the log file appender working, but am having problems with SQL Server.I traced through the log4net code and in ADONetAppender.cs (line 343 in my version, 1.2b8), there is this check:if (m_dbConnection != null && m_dbConnection.State == ConnectionState.Open)I found that the db connection is not null, but the state is ... |
| 09/28/2004 7:37 PM | file output |
| Replies: 1 |
hi,
i am using log4net in an application project with .net which read from machine.config and when i added these configuration to the machine.config to use the debuger view..it works well
<log4net>
<appender name="OutputDebugStringAppender" type="log4net.Appender.OutputDebugStringAppender">
<layout type="log4net.Layout.PatternLayout">
<conversionPattern val... |
| 09/28/2004 1:55 AM | HttpContext logging |
| Replies: 1 |
Hi,I have a web application that I would like to convert to log4net. Currently, when I get an exception I log it to my own custom classes which create a few strings with a dump the HttpContext Request, Session and Server Variables. Then along with the exception, it logs this info to a table within my database. I know I can use the ADONetAppender to take care of the database part, but how and when ... |
| 09/28/2004 12:49 AM | Re: RE: log4net compilation constants |
| Replies: 1 |
Hi Nicko,
I'm trying to compile a log4net CF version, and these are the
steps I took, any idea where I am going wrong:
-I'm using VS.NET 2003
-I downloaded the source code and had to convert it to VS.NET
2003 version(1.1)
-I changed the compilation constants to
DEBUG,TRACE,NETCF,NETCF_1_0
-Go 2 errors
C:\log4net\log4net-1.2.0-beta8\src\Config\DOMConfiguratorAttribute.cs(162)... |
| 09/27/2004 7:55 PM | log4net compilation constants |
| Replies: 1 |
Hi,What are the conditional compilation constants I need to compilethe source code for the compact framework: I am able to compilewith DEBUG;TRACE;NETCF;NET_1_0;NUNIT_TESTS but at Runtime I get"An unhandled exception of type 'System.InvalidProgramException'occurred in mscorlib.dll" from the CompactRepositorySelector.csfile at line 192>>rep =(ILoggerRepository)repositoryType.GetConstructor(Sy... |
| 09/27/2004 3:59 AM | log4net Questions |
| Replies: 9 |
I hope I have the correct e-mail address, but if I don't please let me knowhow to use this system...obviously I am new to this....I have a few questions about using log4net that I would like to get answersto. I have looked in the previous archives, but I haven't found answers.Here goes....1) I would like to define/start loggers programmatically (not withinconfig file). When I d... |
| 09/27/2004 2:36 AM | Watching logs |
| Replies: 9 |
I want to see the logs as they are being logged on a GUI application.
Is there some log client that I can use?
I tried chainsow, but I couldn’t get it to show me anything. |
| 09/25/2004 12:53 AM | Signing and ClsCompliant |
| Replies: 1 |
Has anyone on this list requested or talked about signing log4net and making it CLSCompliant?
If not, please add these features to the list of requests. These should be easy to implement.
Add the CLSCompliant attribute to the AssemblyInfo.cs file. I did this with my sources here and it built with no code changes. Justification: Any developer developing an assembly that is dep... |
| 09/23/2004 8:47 PM | release roadmap (was RE: Should I use v1.1 or v1.2b8 for production) |
| Replies: 3 |
I've asked on this list, three days ago, whether a release roadmap existed.There was no reply.Now, I assume some people here thought I was trolling, because a roadmap issomewhere available for anyone to see, or the issue has been discussed on thelist (or the developer list) recently.I am not trolling. I did search, using the Apache site search mechanism, forthe keywords "release" and "roadmap". ... |
| 09/23/2004 7:44 AM | Anyone consdiering attributes? |
| Replies: 5 |
If not, maybe I'll contribute if I can find a free weekend.
[LogEntry(ifLevel=Debug)]
public void Foo() {
// ...
}
.: mario gutierrez
|
| 09/23/2004 7:07 AM | FW: What to use? |
| Replies: 4 |
I'm more than a little bit confused regarding logging & exception handling.
To start with, I want to use a single point in my applications for logging and possibly for exception handling.
My problem is that I don't know what to choose.
I checked the following:
- log4net
- MS Exception Application Block
- MS Logging Application Block - read the docs, didn't look too deeply... |
| 09/22/2004 12:15 AM | Logging on network share |
| Replies: 2 |
Hello.We are having a bizarre behaviour on logging in this environment:- log4net 1.2.0 Beta 8 (07/15)- .Net Framework 1.1- 2 load-balanced, clusterd web servers, with 4 web applications (each) mounting their docroot from a network share.On both servers, Runtime Security Policies have been modified to let the assemblies get loaded from the network share (new Code groups have been created at Machine... |
| 09/21/2004 11:15 PM | Should I use v1.1 or v1.2b8 for production |
| Replies: 1 |
Hi, I'm new to log4net and am just beginning to evaluate it. I notice that v1.2 has been in beta for over a year. Should I be using the 1.1 release, or is 1.2b8 stable enough for production use? Is anyone out there using 1.2b8 in production?Thanks,Simon. |
| 09/20/2004 4:47 PM | configuration of Log4Net Environment |
| Replies: 1 |
Currently I am using a configuration file to configure log4netenvironment..The format of this configuration file is specified byLog4net which is mentioned below in mailI am using DOMConfigurator.ConfigureAndWatch(FileInfo ConfigFile) APIto configure the envioronmentBut Is it possible that i can configure various appenders and initilizethe log4net environment myself without using this configu... |
| 09/17/2004 2:24 AM | Logging not working in hosted environment |
| Replies: 1 |
I'm using log4net in an ASP.NET application that is hosted at Interlandon one of their shared servers. What is strange is that I can log tomany types of appenders in my development environment but I cannot getlog4net to log anything in the hosted environment. With the exceptionof connection strings the web.config files are identical! I've triedASPNetTraceAppender, ADONetAppender,... |
| 09/14/2004 1:18 PM | catching the exceptions thrown by log4net |
| Replies: 7 |
I am using log4net to log events (Error , Warning , Info and Debug)toRollingFileAppender, Syslog etc..Currently if any error or warning occurs during the working of log4netit throws exceptions which it write to console as log4net:Error<exception> or log4net.Warn <exception>My requirement is like this: Whenever any exception(Error , Warning orInfo) is raised during the working of log4ne... |
| 09/13/2004 10:59 PM | Problems with using BufferingForwardingAppender with ISAPI Filter |
| Replies: 3 |
All,I am trying to use the BufferingFowardingAppender with my ISAPIfilter. Everything is done programmatically. I do aBasicConfigurator.Configure(), create a RollingFileAppender. The RFAis asociated with a BFA (BufferSize=1). This is associated with thelogger and activated.When I log using this config (log done with a FATAL level), the logfiles get created but nothing gets appended in logfile.With... |
| 09/13/2004 10:29 PM | Log4net and chainsaw |
| Replies: 13 |
Hi everyone.I d/l chainsaw v2 and tried to load an xml formatted log file from log4net.It does not seem to do anything. I used drag&drop and open/load file...bothto no avail.1. Do they actually play together? I've read from the release notes thatthey do. Has anyone gotten it to work? It seems so straightforward to me but<scratches head> :(2. I saw a message in the status bar..No VFS. Is ... |
| 09/13/2004 10:04 AM | Question on RollingFileAppender and UdpAppender |
| Replies: 9 |
To all,
I've got 2 questions about RollingFileAppender and UdpAppender (using a WinCE.Net testing environment) 1) I've found RollingFileAppender will still log to the log file even if the specified file size has exceeded the value I've set on the RollingFileAppender object?
The settings are : oRFile = new log4net.Appender.RollingFileAppender ();  ... |
| 09/13/2004 12:54 AM | Re: Build problems with CVS code |
| Replies: 5 |
Try using a recent nightly build of NAnt :http://nant.sourceforge.net/nightly/buildsGert |
| 09/09/2004 4:20 AM | Unusual ADONetAppender output |
| Replies: 3 |
|
| 09/09/2004 1:49 AM | Programmatically disable logging |
| Replies: 5 |
I'm creating a custom database appender. Since our log messagessometimes exceed the max size of varchar columns, I'm intercepting thelarge messages and persisting them to a file replacing the message withthe file path. Unfortunately, all of our common assemblies such as dataaccess and file writing use log4net. So, whenever I use our data accesslayer (DAL) within the database appender, the DAL itse... |
| 09/06/2004 1:53 PM | facing problem |
| Replies: 7 |
HiI want to use XMLConfigurator in order to keep all theLog4net configurations in seperate file.I am using itsbeta 8 version but in that version i am unable to findXMLConfigurator so kindly help me in solving this problem.If there is another way to solve the problem of keepingLog4net configurations in other file, please let me knowas soon as possible.RegardsShoaib |
| 08/31/2004 4:37 AM | ANN: NLog 0.2 beta1 has been released. |
| Replies: 1 |
NLog 0.2-beta1 has been released and can be downloaded athttp://nlog.sourceforge.net/.NLog is a .NET logging library similar in concepts to log4net, designed withsimplicity and flexibility in mind. It supports the base concepts of log4net(appenders, layouts, filters) and makes them easy to use in yourapplication.Features:- ease of use (uses familiar WriteLine() style interface)- maintainability (t... |
| 08/28/2004 4:15 AM | RESEND - RE: Question regarding permissions |
| Replies: 1 |
RESEND. Hopefully I can get a taker.
Sorry for the WOB, just need to figure out this behavior.
From: Denis, Rich
Sent: Wednesday, August 25, 2004
4:12 PM
To: Log4NET User
Subject: Question regarding
permissions
Hello all,
I was hoping for a little extra brain power. I
have recently moved to 2003 and was running... |
| 08/28/2004 4:02 AM | No debug message in Visual Studio |
| Replies: 5 |
Hi,I've a ASP.NET project with log4net used. This project has 2 referencesin the same solution to 2 Class Library Projects. I use also a dllreference to Nhibernate framework (http://www.nhibernate.org ). Alltheses three projects use also log4net and have their configuration inApp.config files.What I want ? See debug information in the debug window inside VisualStudio 2003.I've put this in configur... |
| 08/28/2004 12:20 AM | (Rolling)FileAppender does not work in ASP.NET process |
| Replies: 1 |
Hi everyone,I've experienced that log4net doesn't work within the ASP.NET process.I assured that the user the ASP.NET process is running under hadaccess to the log4net.dll and had full access to the logging directory butstill it didn't work.When I turned on internal debugging with the <AppSettings>-tagand attached to the ASP.NET process I found that the ASP.NETprocess wasn't able to load the... |
| 08/27/2004 7:39 PM | FireEventAdapter |
| Replies: 1 |
Hello,
could you send me please the FireEventAdapter.cs?
I think ist would solve my problem:
1. I have multiple instances logging to the same lofile.
2. The LogPath will be changed at runtime.
Both I tried with the rollingFileAdapter, but I couldn't manage it.
No I would do the logging on my own, after getting the Events from the mentioned adapter.
Mit freundlichen Grüssen... |
| 08/26/2004 5:11 AM | Question regarding permissions |
| Replies: 1 |
Hello all,
I was hoping for a little extra brain power. I have recently moved to 2003 and was running a web app that uses log4net which uses a file appender. On my 2000 box I needed to create the folder location that the file would log to and set permissions for the ASPNET user to get log4net to log there. Today when I went to set that folder up after I had run my app, ... |
| 08/26/2004 2:45 AM | App.config file is causing errors in 1.2.8 |
| Replies: 13 |
Hi,I am using the log4net 1.2 beta 8 for .Net 1.1. The example config filein the distribution for vb.net does not work - so I took elements fromthe Java version. Now all the configuration stuff is read, butDOMConfigurator prints an error.log4net:ERROR DOMConfigurator: ConfigureFromXML called with null'element' parameterlog4net:ERROR DOMConfigurator: ConfigureFromXML called with null'element' param... |
| 08/24/2004 7:15 AM | XSL or GUI |
| Replies: 1 |
Hi,
I’m wondering if anybody uses an XSL file or GUI to graphically display the configuration of their Log4Net XML Configuration? While I don’t find it too hard to read the log4net format, some basic users would appreciate a graphical representation of the configuration. I was going to start my own, but I’m sure somebody out there must have already done one.
Cheers
Ma... |
| 08/24/2004 12:11 AM | XmlLayoutSchemaLog4j and hostname |
| Replies: 1 |
XmlLayoutSchemaLog4j wasn't providing a hostname in its output. The code
would only provide a hostname if the hostname was already in the logging
event. So far, I haven't seen the hostname in any logging event and I
noticed that the other appenders that provide a hostname in their output use
SystemInfo.HostName as the source.
I've solved the problem by making the code in t... |
| 08/21/2004 9:45 PM | ANN: New N-tool available - NLog |
| Replies: 1 |
Hi!
I'd like to let you know about the new open source project called "NLog"
which is a simple but quite powerful logging library for .NET.
The design goals:
- ease of use (uses familiar WriteLine() style interface)
- maintainability (trivial to configure and re-configure)
- speed (uses "zero allocations" principle whenever possible)
- portability (.NET, Mono... |
| 08/21/2004 7:33 AM | Building using NAnt |
| Replies: 23 |
Hello, I have gotten the latest source files for log4net and tried usingthe latest source from NAnt(0.85.1684.0) to build the project. Somethingseems to go wrong when I build. Can anyone look at this and tell me why itis failing. It seems to be an XML doc related issue. You will see theSummary tag not matching as the error throughou... |
| 08/21/2004 3:37 AM | logging to a textbox... |
| Replies: 17 |
Hello,
I've been able to get simple logging (console and text file) working, but I would like to have a GUI application log to a file and a textbox.
Logging to the file is no problem, but I'm a little confused as to which appender I should use and how I should use it.
I've thought about putting a file watcher on the log file, but that seems a bit inelegant.&... |
| 08/21/2004 1:33 AM | NDC vs. MDC |
| Replies: 3 |
|
| 08/20/2004 10:57 PM | Help with EventLog Appender |
| Replies: 5 |
I have the following defined:<appender name="EventLog" type="log4net.Appender.EventLogAppender" > param name="ApplicationName" value="MyEventLog" /> <layout type="log4net.Layout.PatternLayout"> <param name="ConversionPattern" value="%m" /> </layout></appender>When I use ... |
| 08/20/2004 5:21 PM | Multi-database appender |
| Replies: 3 |
Dear All,We are considering using log4net as logging services for ASP.Net internetapplication, that works with multiple MSSQL databases. Basically, user canwork with different databases and we need to log events into these databasesseparatelly as well. Our obvious choice was ADONetAppender, but here wefaced the following problem:It looks like log4net framework is configured 'once at in a lifietime... |
| 08/19/2004 9:59 PM | Question : versioning. |
| Replies: 1 |
We (our group) have been thinking about deployment and third party libraries as we're looking at using such products as log4net and TRA-SDK, etc. Our mother product dumps all the assemblies for a build into the bin directory of the web application. One potential issue that has been brought up in the past is versioning.
For example, the TRA-SDK uses log4net as are we. Only one log4net... |
| 08/18/2004 1:09 PM | SMTPAppender Placing variables in Subject field |
| Replies: 5 |
I am trying to find a way to place the name of the logger and theloglevel into the subject field of the email that is sent using theSMTPAppender.Eg. Email subject = "ABC.Logger - INFO"I crossed my fingers and tried what I thought the obvious solution mightbe but the following configuration does not substitute the correctvalues for %l and %p.SAMPLE CONFIG----------------------<appender name="S... |
| 08/17/2004 9:38 PM | XmlLayoutSchemaLog4j timestamp |
| Replies: 9 |
XmlLayoutSchemaLog4j uses local time instead of UTC/GMT in timestamps. As aresult the log4j chainsaw viewer displays times incorrectly.This can be corrected by changing the initialization of s_date1970 inXmlLayoutSchemaLog4j.cs to the value of DateTime.Parse("1970-01-01 0:0:0GMT").Mike Blake-Knoxemail: MBlake-Knox@tsystsol.comTSYS Office: (706) 644-3643cellphone: (706) 570-4641 |
| 08/13/2004 3:08 AM | New to log4net - specifying config file in AssemblyInfo.vb |
| Replies: 5 |
I'm brand new to log4net, so I apologize if this issue has been raised recently.I'm using log4net 1.2.0 beta 8 with .NET 1.1 and VB.NET. The outputis a .exe console application.I'm trying to specify the log4net config file in AssemblyInfo.vb.Using the following syntax:<Assembly: log4net.Config.DOMConfigurator("ConfigFile.xml")>I receive a "Too many arguments to public sub new()' error.... |
| 08/12/2004 7:29 PM | log4net with asp.net |
| Replies: 3 |
Support,Version : log4net-1.2.0-beta8Project type : ASP.NET projectWhen i attempt to do logging in asp.net project a log is not created, I havethe following code in a c# class that is called by asp.net pageprivate static readonly ILog Logger =LogManager.GetLogger(typeof(ContentExporterController)); /// <summary... |
| 08/10/2004 8:29 AM | MemoryAppender Example |
| Replies: 6 |
Hi,
I’m trying to enable a MemoryAppender and access the logged information from within code to be displayed in a form. Ideally I’d like the MemoryAppender to be configured in the config file. I already have a working config file which logs to a file and the debugger, and I added the following currently posted example:
<appender name="MemoryAppender" type="... |
| 08/07/2004 5:50 AM | SMTPAppender authentication |
| Replies: 4 |
Hi Guys,I've recently started using the log4net logging service. As a previous Java user I was extremely happy to see a .Net version.I started using the SmtpAppender and found that it did not support authentication.I have got this working in with the 1.2.0-beta8 and wondered how to have this added to the project, if it's worthy ;).
I have the source for the SMTPAppender.cs but didn'... |
| 08/06/2004 7:49 AM | Cannot get Log4Net to compile using Nant or VC 2003 |
| Replies: 6 |
Hey All,I can't get Log4Net to compile - using either the latest version ofNant, or from loading up the project in the 'src' directory. Iunderstand that the documentation project for describing how to compileLog4Net is 50% done, so I can't really look online for help. I've beenbrowsing this email archive and from the developer email list archive -still nothing helpful.Could someone ple... |
| 08/06/2004 7:26 AM | Build problem with 1.2 Beta 8 |
| Replies: 2 |
I just downloaded the latest version of log4net: 1.2 beta 8. My computer is Windows XP SP1 with only .Net framework 1.1 installed. When I run the build.cmd, it fails to find “csc.exe” – the csharp compiler in 1.0 framework directory.
How do I control the build program so that I can build it only for framework version 1.1. I looked around the website before posting this question an... |
| 08/05/2004 9:23 PM | log4net:ERROR No appender named [LogFileAppender] could be found. |
| Replies: 5 |
Hello All, I seem to get this error even when I copy the appender configsections directly out of an example.log4net:ERROR No appender named [LogFileAppender] could be found.What am I doing wrong?Thanks,Ryan |
| 08/05/2004 4:50 AM | New with log4net - Question |
| Replies: 2 |
I am new with log4net, and I have trouble understanding the concept of the logger.
Here’s what I think I know: the configuration file has appenders, which are the output destinations for logging.
The <root> section specifies the level for logging. I set the <level> in here to “INFO”.
In my code I declare the log as
private static readonly log4net.ILog log = log4... |
| 08/05/2004 12:40 AM | Can"t write to a network drive |
| Replies: 1 |
I am using the log4net"s FileAppender. It is perfectly fine when the logfile is set to a directory in the local hard drive. However if the logfile is in a mapped network drive, log4net refuses to log anything and there is not any error message either. Is there any way to solve it? Here is the config for lcoal drive d:\ <param name="File" value="d:\\logfiles\\Log.t... |
| 08/05/2004 12:27 AM | using log4net in an addin application for vs2003 |
| Replies: 0 |
I am trying to use log4net in an addin application for vs2003. Where
should I put the configurations for log4net?
Thanks.
|
| 08/04/2004 10:55 PM | Error using ADONetAppender |
| Replies: 8 |
Hi, I'm try to log messages to Oracle database. I got the following debug errors when run my application. ------------------------------------------------------------------------------------------------------------------------------- log4net:ERROR [ADONetAppender] Failed to load connection type [System.Data.Oracl eClient.OracleConnection,System.Data.OracleClient, Version=1.2.0.30714, Culture= neut... |
| 08/04/2004 9:33 PM | Logging levels |
| Replies: 0 |
Is there a way to create a new logging level and create an
appender for that logging level?
|
| 07/30/2004 10:38 PM | Data Types |
| Replies: 2 |
Can I use a Text sql type for the ado appender? If so, what would I set as the size? If not, can I use a blob? |
| 07/29/2004 1:23 AM | cpp ConsoleApp compile problems |
| Replies: 1 |
Hi,I'm using log4net v1.2.0 Beta 8 and trying to get the example C++ ConsoleAppto compile and am having a few difficulties. Here is the current error thatI am experiencing:ConsoleApp fatal error C1107: could not find assembly'..\..\..\..\..\..\..\bin\net\1.0\release\log4net.dll': please specify theassembly search path using /AI or by setting the LIBPATH environmentvariableI set the assembly ... |
| 07/28/2004 9:18 AM | How to use different appender for each logging level? |
| Replies: 2 |
Hi All,How can I configure my xml configuration file so that each level of loggingcan be send to different appender. For instance I want so log debug level toconsole, info to rolling file appender and the error level to windowsEventLog appender.Thanks for any input.Regards,Wayan |
| 07/28/2004 5:18 AM | Adding new parameters to ADONetAppender |
| Replies: 2 |
Is it possible to add parameters to the ADONetAppender?I'm already using @thread, @loglevel, @logger, @description. But I'dlike to add a few new ones and have log4net put each on of the new onesin a column of a SQL database.I understand how to add the parameters to the log4net config file, buthow do I send the values of the parameters to log4net?For example, let's say I want to add a param... |
| 07/27/2004 10:13 PM | How does work? |
| Replies: 1 |
I have the following default appenders set up:<root><level value="ALL" /><appender-ref ref="OutputDebugStringAppender"></appender-ref><appender-ref ref="SmtpAppender" /></root>In my SmtpAppender, I then have:<appender name="SmtpAppender" type="log4net.Appender.SmtpAppender"><to value="jritchie@tradearca.com" /><from value="jritchie@tradearca.com" ... |
| 07/26/2004 11:46 PM | OutputDebugStringAppender and VS Output Window |
| Replies: 5 |
I was expecting OutputDebugStringAppender to write to the Visual Studio output window as a debug.write call would. Is my assumption incorrect? (Note that this is the output window, not the console window.)I have confirmed other logging appenders work and the OutputDebugStringAppender output does appear in a debug viewer, like sysinternals.However, I'd prefer to not have to use an external viewer. |
| 07/26/2004 8:50 PM | ERROR in VS.NET 2003 (WORKS IN VS.NET 2002) |
| Replies: 1 |
Hi,Version: 1.1.1.33753When I tried Console sample application using VS.NET 2002, it WORKS =FINE. I created a new console application using VS.NET 2003 and added "loggingExample.cs" file to the project, It gave me the following error:
log4net: ERROR No appenders could be found for category (testApp.LoggingExample).log4net:ERROR Please initialize the log4net system properly.
NOTE: I used ... |
| 07/24/2004 1:26 PM | logging method name and formatting method name |
| Replies: 3 |
Hi,
I am new to Log4net. I am seriously thinking about using this logging utility but I am missing one big expectation.
I would like to add method name in the log message. This way I know which method logged message. I saw class LocationInfo.cs that has MethodName property. This means we should be able to log method name in output log te... |
| 07/24/2004 12:02 AM | Using log4net within a dll |
| Replies: 2 |
Hello All, I've searched over some post and found some examples for usingLog4NET in a dll. One post suggested that if I was to encapsulate thelog4NET coding in a dll, and call it from an assembly, I should call theDOMConfigurator.(PathToConfigurationFile) which I have. So basically I callthis, passing in aFileInfo(AppDomain.CurrentDomain.SetupInformation.C... |
| 07/19/2004 8:53 PM | ADONETAPPENDER |
| Replies: 15 |
Hello,I want to use the appender ADOnetappender to write messages in a sqlserverdatabase. I use this appender configuration:<appender name="ADONetAppender_SqlServer"type="log4net.Appender.ADONetAppender"> <param name="bufferSize" value="100" /> &nbs... |
| 07/17/2004 8:36 AM | not loading the DOMConfigrator |
| Replies: 1 |
Hi all,
I’m using the log4net logger in a library that’s used by a Nunit TextFixture assembly.
In my textfixture assembly, one of the cs files has this at the top:
[assembly: log4net.Config.DOMConfigurator()]
However, when Nunit starts, it’s not creating a DOMConfigurator, and hence, not reading my config file for appenders.
Anyone know what I’m doin... |
| 07/16/2004 1:49 PM | Version Dilemma |
| Replies: 0 |
I am using log4net in an ASP.NET application. My
log4net section in the web.config file is as follows:
<log4net>
<appender name="MainLog"
type="log4net.Appender.RollingFileAppender" >
<param name="File" value="C:\\Logs\\MainLog.txt"
/>
&nbs... |
| 07/14/2004 6:09 PM | i am not able to implement logger in my project |
| Replies: 3 |
I am not able ot use log4net in my test program...i 've to implementit in our website, after the execution it says it was not able to findany appender that is used in the configure files--RegardsPrashant Gyan+919886141917 |
| 07/14/2004 1:05 AM | Log4net new user: error no appender found: what am I doing wrong? |
| Replies: 13 |
Hello,I've just started to try and use log4net but can't get past first base -which I'm hoping is a simple error on my part. I'm using C#, vs.net 2003,SQL Server 2000.I have a basic console app with an app.config like so. I've mainly cut andpasted this from the various available examples:<?xml version="1.0" encoding="utf-8" ?><configuration> &l... |
| 07/14/2004 12:35 AM | XML appender |
| Replies: 1 |
I may have missed it, but it there a XML file appender available for log4net? Thanks. |
| 07/09/2004 2:13 AM | using RemotingAppender |
| Replies: 3 |
Hi;
Is there any information anywhere on how to run the RemotingAppender? I see how to set my logging config to use it – but how do I get the RemotingAppender server to run?
Thanks - dave |
| 07/09/2004 2:10 AM | Where can I find a list of the PatternLayout items |
| Replies: 5 |
I’ve read all the docs, I’ve read the FAQ, I’ve done a google search. And nowhere can I find a list of what the various PatternLayout formatting characters are.
Thanks - dave |
| 07/08/2004 10:49 PM | Strange behaviour |
| Replies: 8 |
I have just started with log4net, and am having some difficulty ingetting things going.I have code:Imports log4netImports log4net.ConfigModule Module1 Private log As log4net.ILog =log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType) Sub Main() Debug.WriteLine("Starting") ... |
| 07/08/2004 1:24 AM | Adding custom level |
| Replies: 9 |
Hi,How do I add custom level , like TRACE on top of existing log4net levels?I know that in log4j, I can extend Level class.Does anybody have sample code for log4net to do this ?Thank you,Nik |
| 07/07/2004 8:44 PM | Question about remotingappender |
| Replies: 1 |
Hi, We need to log to a single file from several web services using log4net. So we need to use remotingappender. I started with your example (in examples\net\1.0\Remoting). I only got the "Application [RemotingServer] Start" and "Application [RemotingServer] End" in the log-file.txt. The logging messages from the client were not output to the log file. When I enable the internal debugging, I got t... |
| 07/07/2004 5:20 PM | query regarding log file path |
| Replies: 1 |
hai group.This is suresh from i7asia. i have one query.The code below is the configuration file for log4net....I need to know where is the destination file logfile.txt stored. I searched for this file but i didnt find it....my requirement is to store the log file logfile.txt in the location where the web application is stored.plz help me in this aspectplz check out the following<configSections&... |
| 07/06/2004 3:23 PM | about logging |
| Replies: 1 |
Hi all, I am using log4net(1.1.1) in .net version(1.1). I want to store the log file in the location installed. or in other words i want to store it in the virtual directory. How to store?Regards,Rajkumar M R |
| 07/02/2004 12:44 PM | Unable to tail log while writing it |
| Replies: 1 |
Hi,I am trying to read the log file while another thread writes to it. But it gives the following ERROR Message," An unhandled exception of type 'System.IO.IOException' occurred inmscorlib.dllAdditional information: The process cannot access the file "C:\Documents andSettings\elavarasan\Desktop\Agent\TxtLog\Logging\LogFiles\log.txt" becauseit is being usedby another process. "Environmen... |
| 07/01/2004 5:41 PM | Problem with RemotingAppender and RemoteLoggingServerPlugin |
| Replies: 1 |
I am trying to use the logging via remoting. I have one client exe and a server exe. (Windows forms, .Net1.1, log4net version 1.2.0.30714) The server has a rollingfile logger, the client has to log via remoting to the servers rolling file. Thats all I want to do.
These are part of my code to accomplish this. The problem is that I do not get any erros and stil nothing works. Can anybody help... |
| 06/30/2004 11:40 PM | how to include % conversion pattern tokens |
| Replies: 1 |
What is the simplest way to add %tokens to the conversion patterns? For example, I want to include the stack trace of the exception object and the IP or MAC address of the originating device with each log.Error() call. Do I have to jump through a lot of hoops, or is there an easy way? |
| 06/30/2004 12:03 AM | Restarting app can cause logging to stop? |
| Replies: 5 |
Folks,We are using log4net extensively in our applications which consist of a lotof windows services and web services. However we have spotted sometimes(only somtimes mind) that when a service is stopped and restarted, loggingto the RollingLogFileAppender will completely stop; messages will not bewritten to the logfile any more, although messages _will_ get written to anEventLogAppenderThis ... |
| 06/28/2004 11:10 PM | When will 1.2 leave beta status? |
| Replies: 1 |
Just curious as to when log4net 1.2 will leave beta 8 status? It seems thatthe last release was nearly a year ago...logging.apache.org/log4net points at sourceforge for downloads, butsourceforge says that log4net has moved to apache, so I am not sure where Ishould be looking for latest and greatest.SincerelyPete McEvoy |
| 06/28/2004 1:58 AM | RE: [Log4net-users] Getting wacky results when using an ado.net appender. |
| Replies: 0 |
John,
The example documentation on the site became out of sync with the beta8
release during the move to apache.
If you look in the log4net-1.2.0-beta8\doc\manual directory from the
download you will see the correct documentation. All you need to change
is in the ConversionPattern properties you should change the value to
the single letter version rather than the long pattern name ... |
| 06/24/2004 10:39 PM | ConfigureAndWatch event? |
| Replies: 1 |
When using DOMConfigurator.ConfigureAndWatch, is there way to be notified (callback or delegate, etc) when the configuration file has been reloaded? I was looking at the source, and it didn't look like there was. I just wanted to make sure.
Thanks Allen Lyons |
| 06/24/2004 3:56 AM | Still looking for help with ADONETAppender example. |
| Replies: 5 |
Hello,I am still not able to get the ADONETAppender example to work with Oracle.Everything runs fine as far as I can tell (i.e. no errors). If I run it indebug mode and the following if stmt is true and the parms inside it getexecuted but nothing is written to Oracle. Private Shared ReadOnly oraclelog As ILog =LogManager.GetLogger("ADONetAppender_Oracle") &... |
| 06/22/2004 12:53 AM | RollingLogFileAppender stopped rolling |
| Replies: 1 |
Hi,I started using RollingLogFileAppender 3 month ago. It worked fine until recently. It stopped rolling for no reason. The file hasn't been rolled to a new file in 5 days. There isn't any configuration change. The dll version is 1.2.0.30714. Here is the Config I am using. Thanks for your help. Dan------------------------------------------<log4net> <root> <l... |
| 06/21/2004 11:41 PM | RE: Any plans for an MSI package? |
| Replies: 7 |
Actually, log4net should ship with both an MSI for itself and an merge module to include in other installations.
The MSI is pretty easy, but I don’t know much about merge modules.
-c
|
| 06/18/2004 1:21 PM | Strange problem on IIS |
| Replies: 0 |
Hi folks,
im working on an three-tier application which uses .NET Remoting to
communicate with the server. On the server side i use Log4Net 1.2beta8 for
logging. The server application is hosted on a IIS. Inside the server
application i have some classes which are defined as Singleton (not
WellKnownMode="Singleton", real Singleton object). All services called from
the clien... |
| 06/17/2004 12:37 AM | Conversion patterns |
| Replies: 2 |
Hello,Can anyone point me to a list of possible characters and their meanings foruse in conversion pattern of a PatternLayout?Thanks in advance for any help.David-----------------------------------------The information contained in this message is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this message is not the intended recipient or an... |
| 06/15/2004 7:58 PM | config is not read with COM Addin |
| Replies: 1 |
HelloI created an Outlook addin and want to use log4net for logging. If i debug my addin within VS.NET the log4net assembly is loaded. Log.Debug("blalaaa") is not resulting in a logentry. and no log4net debug info is logged (debug=true in the config file) to the debug window in vs.net.I added these lines to the assembly.cs:[assembly: log4net.Config.Domain("Addin")][assembly: log4net.Config.DOMConf... |
| 06/15/2004 2:52 AM | RemoteLoggingServerPlugin Info/Example |
| Replies: 1 |
I want to create a remoting server to capture log information to file from different processes using log4net with the remoting appender. Does anyone have a quick example or any helpful information on how use the RemoteLoggingServerPlugin to do this? The documentation mentions the plugin, but I don't understand what to do with it -- any information would be helpful.
Thanks,
Mike |
| 06/13/2004 6:30 PM | log4net deleting config file at startup |
| Replies: 5 |
I am having a strange problem. I would like to use log4net from aWindows Forms application. I am trying to configure log4net using thedirective:[assembly: log4net.Config.DOMConfigurator(Watch=true)]I named a config file the same as my EXE with ".config" appended (usingthe config file from the ConsoleApp example). When I start up my app, myconfig file is deleted.I tried doing the same things in a s... |
| 06/12/2004 1:27 AM | Appender question |
| Replies: 1 |
Hello,I've been able to get FileAppender and RollingFileAppender to work fine butI'm having trouble with the ASPNetTraceAppender and ConsoleAppender.If I step thru the code in debug mode the IsDebugEnabled method returnsTrue and it looks like it's executing the logging code but I'm not seeingany output.My understanding was that the ConsoleAppender's output would show up in theOutput window in Visu... |
| 06/11/2004 5:13 PM | Writing custom errormessages |
| Replies: 1 |
Hi.I have subclassed the LayoutSkeleton class successfully so that I can formatmy own custom log information.Is there any way to get the exception object? I see that it is stored in theLoggingEvent as m_thrownException, but it is not accessable. I need thisobject to be able to retrieve properties within the exception, withouttouching the Message property.I have attaced a small example, but if ther... |
| 06/11/2004 4:19 AM | Rolling logs, one for each run of the application? |
| Replies: 3 |
We need to configure log4net to create a new log file each time our Windows Forms application starts. It seems like the RollingFileAppender should handle this, but I can't find an example that does this. The examples I find are all the same, keeping 10 logs of up to 100k each. Is there a way to configure log4net to create a new file each time the application starts, keeping the m... |
| 06/10/2004 8:53 PM | Logging to Oracle |
| Replies: 2 |
Hello,I getting stuck trying to get this Oracle logging example to work ... (http://log4net.sourceforge.net/release/1.2.0.30507/doc/manual/example-config-appender.html) We don't have Oracle 9. The only thing I thought I had to do was toeliminate the Datetime column because our version of Oracle doesn't have adatatype of timestamp.So my table is defined as follows:CREATE TABLE CSAX30.LOG(&nbs... |
| 06/10/2004 5:03 PM | log4net-1.2.0-beta8: System.NullReferenceException on invalid configuration file |
| Replies: 1 |
I got the following error from log4net-1.2.0-beta8--An unhandled exception of type 'System.NullReferenceException' occurred in log4net.dllAdditional information: Object reference not set to an instance of an object.--On invocation oflog4net.Config.DOMConfigurator.ConfigureAndWatch( new System.IO.FileInfo( "log4net.config" ));The log4net.config file was:--<?xml version="1.0" encoding="utf-8" ?&g... |
| 06/09/2004 11:13 AM | Where to put config info |
| Replies: 2 |
Hello,Just getting started with log4net so please be patient with what may be asimple question for those of you more experienced than me.When I first started looking at log4net the examples I saw had theconfiguration information in the Web.config file. Then I downloaded version1.2.0 beta8 and I can't seem to get it to work with the config info in theWeb.config file. The example has the information... |
| 06/07/2004 12:24 PM | Repositories/Domains |
| Replies: 1 |
I was developing a component library that I thought I would create its own repository for. I have added the necessary Domain attribute to create it. What I want to know is if I call LogManager.GetLogger(<LoggerName>) does the fact that the Logger is getting created in the context of the assembly that I specified another repository for mean that it will get created in that “Doma... |
| 06/07/2004 6:45 AM | XML Layout |
| Replies: 13 |
Hi,When I use XMLLayout using the rolling file appender is there anyway for itto create valid XML files. By this I mean with opening and closing <?XML>tag etc?CheersMatthew James Easlea |
| 06/06/2004 8:45 PM | Appender config is not being loaded? |
| Replies: 0 |
Hi All..I've just started to attempt using log4net in a project - I have this config(btw, I'm using version log4net 1.1.1) <!-- log4net config section --> <log4net debug="true"> <appender name="LogFileAppender"type="... |
| 06/05/2004 10:19 PM | Fw: Dyanmic Levels. |
| Replies: 8 |
Am I correct in assuming that at this time functionality for dynamicallychanging the ordering of the the Levels in the log4net.spi.Level class? Doesanyone know if this is on the "roadmap" for any time soon? I'd really hateto have to continually rebuild log4net just to make some changes in thelog4net.spi.Level class.Thanks! |
| 06/04/2004 7:41 PM | Build for .NET FW 1.0 and 1.1 |
| Replies: 1 |
Hi allI'm wondering why there are two builds: one for .NET Framework 1.0 and onefor 1.1. Does there exist a reason?I'm developing frameworks for other application developers. Therefore, do Ihave to build my framework with .NET 1.0 and log4net 1.0 and once with .NET1.1 and log4net 1.1?Thank you for any hints.Oliver******************* BITTE BEACHTEN *******************Diese Nachricht (wie auch all... |
| 06/04/2004 1:36 PM | Exchange Server |
| Replies: 3 |
Hi,Has anybody had to use the Log4Net SMTP adapter to talk to a MicrosoftExchange Server in a corporate environment before?CheersMatthew James Easlea |
| 06/04/2004 4:20 AM | ADONetAdapter for SQL Server not working |
| Replies: 1 |
I'm not able to get ADONetAppender to work with SQL Server 2000. The connection string is good as I can copy/paste into console and web apps and connect to the SQL Server. I debugged into the log4net source and found that ADONetAppender's InitializeDatabaseConnection method is never invoked, so when the code reaches line 343 of ADONetAppender.cs (SendBuffer method) the connection is nu... |
| 06/03/2004 3:21 AM | Log4Net FileAppender encoding values |
| Replies: 1 |
Hello All,
In the Log4Net manual, more specifically the FileAppender example, an encoding value is used to specify Unicode.
I assume utf-8 and unicodeFFFE are allowed based on the example. Are there any other allowed values for the encoding tag?
See the example code snippet from the manual below:
<appender name="FileAppender" type="log4net.Appender.FileAppen... |
| 06/02/2004 12:05 AM | Changing FileAppender log file at runtime |
| Replies: 3 |
Hi All,Is it possible with 1.2.0 beta8 (.Net Framework 1.1) to change theFileAppender log file at runtime (versus getting it from my config file andusing it from that point on)?I've got an ASP.NET application calling my assembly on the backend and Iwant to generate log files (when enabled) with a name based on somethingfrom the session information.Thanks in Advance!Corey.-----Corey MJ Wirun, B.Sc.... |
| 06/01/2004 4:05 PM | Log4net in production environments (was: Independent FileAppenders) |
| Replies: 3 |
Regarding 1.2.0 still being in beta:We've been using 1.2.0 beta 8 on two servers since it was releasedalmost a year ago, and it's been running in production on appx 500computers since September. By the end of this year it should be runningon ~10.000 computers and 500 servers in a point of sale solution.We are primarily using RollingFileAppender and ConsoleAppender withPatternLayout. With "verbose"... |
| 05/26/2004 6:16 PM | Independent FileAppenders |
| Replies: 22 |
I am using log4net 1.1.1I need to log messages to two different log filesseparately. For example I need to log "Message 1" to"C:\Log1.txt" and "Message 2" to "C:\Log2.txt".Logging to one log file should not have any effect onthe other. I am developing an ASP .NET application,and the Logger needs to be configurable from theweb.config file.Currently, I am using two FileAppenders. The problemis when ... |
| 05/26/2004 5:35 AM | What am I doing wrong... |
| Replies: 2 |
Hello all,
Today I tried to get a bit more detailed with my logging. I had one class that I needed to see more information on (PSC.Tenet.CIE.RetryManager) so I created the Logger config for it as seen below. I set the level to Debug so that I could see all of the information on it. The problem is that when I run the application only the WARN and above messages are getti... |
| 05/25/2004 11:33 PM | Threading |
| Replies: 1 |
There has been some discussion lately on Remote Sinks. Would I need to useRemote Sinks forthreads? or only in the event that I have multiple apps / web services thatwant to log to thesame resource?If I don't need to do remote sinks, then would each thread create/obtain alogger using GetLogger()and then have 1 appender attached to each logger? That is if I wanted allthe messages t... |
| 05/25/2004 11:19 PM | Question on SDK Classes |
| Replies: 5 |
I like taking programs apart in order to understand how they work. Therearen't alot of examplesfor me to disect, so I must ask some of these questions. If anyone has moreadvanced demos theywould care to share, I would appreciate it.I have Looked through the SDK and have traversed the ILog structure that isreturned from theLogManager.GetLogger() method using intellisense.Are the majorit... |
| 05/25/2004 1:06 PM | log4net assembly version |
| Replies: 2 |
I noted that the log4net version number is 1.2.0.30714.But it should be 1.2.30714.0.http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconassemblyversioning.asp-Oliver |
| 05/25/2004 3:23 AM | Formatting |
| Replies: 1 |
Where are the definitions for the formatters such as%d [%t] %-5p %c [%x] - %m%nI know that %d is a date, how would I change the format to display just thetime and no date?Thanks,Dave_________________________________________________________________Stop worrying about overloading your inbox - get MSN Hotmail Extra Storage!http://join.msn.click-url.com/go/onm00200362ave/direct/01/ |
| 05/25/2004 12:25 AM | Remoting question |
| Replies: 3 |
I finally got the remoting process working correctly except for one snag, ifthe client remoting application is not running then the web serviceapplication performance becomes extremely sluggish. Is there a way topassover the remoting logging within log4net if the sink does not exist? |
| 05/25/2004 12:23 AM | Configuration Questions |
| Replies: 8 |
I am just starting out using Log4Net. I have looked through the .chm fileand the introduction.htmlfiles and still have some questions on the items contained within theconfiguration file and in general.General============================1) What is the difference between using <appender> and <logger>?2) Is there an example somewhere for Level Inheritance?<Root>===============... |
| 05/23/2004 11:40 PM | Need help with remoting |
| Replies: 5 |
I have been trying to create a client application to capture the remotinglog events but haven't been able to. I looked at the sample remotingapplication that came with log4net but the way I need to do the logging isdifferent than how the sample is setup.I have mutiple web services that I am writing and am creating a loggingrepository to log all trace messages and errors to a single location. Iwoul... |
| 05/21/2004 11:48 PM | Bug? Log4Net 1.1 does not allow several processes to log into the same files. |
| Replies: 9 |
Hello, Log4J works fine, but Log4Net does not. If it cannot work at all, whatis the recommended way of handling it?- Alexey. |
| 05/20/2004 4:20 AM | Where is the log4net.Config.XmlConfigurator? |
| Replies: 1 |
Hi all,According to the document (http://logging.apache.org/log4net/release/manual/configuration.html)there is a log4net.Config.XmlConfigurator class, but I can't seem tofind this class anywhere. There's no file in the source codecorresponding to this class. Any help?Thanks!Phil Haack |
| 05/17/2004 2:54 AM | log to a logform |
| Replies: 0 |
Hello
Anybody implemented already the LogAppender to a standard WinForms with for example a (multiline) texbox or listbox?
Regards,
Marco |
| 05/14/2004 3:30 AM | Dynamic reconfiguring |
| Replies: 4 |
Hello all,So I'm still frustrated by the lack of the ability to programmaticallyconfige log4net at runtime, so I've managed to get it partially workingby writing out config files and then calling the DOMConfigurator.It seems to work only some of the time. It's not reliable which is verydisconcerting.My code has written out the following config:-----<log4net> <root> &nb... |
| 05/13/2004 5:16 PM | RemotingAppender: HostName and UserName II |
| Replies: 1 |
Hi,I just checked the latest log4net version out of CVSand the remoting appender is working much better. Theasynchronous method of sending log events and thefailover when the remoting server is not present aregreat.One thing which appears broken - although it could beme missing something again - is the extraction ofproperties at the remoting server. In my last messageI stated that you had to use %... |
| 05/12/2004 8:06 PM | RemotingAppender: HostName and UserName |
| Replies: 1 |
Hi,I am using the remoting appender and want to see thehost and user that the log message has originatedfrom.The FAQ gives examples of using %P{hostname} and %Wfor the username. The hostname property was alwaysblank and the usename property always returned theuser owning the local logging process not the one theuser of the one that generated the logging message.After looking in the coded I got the... |
| 05/12/2004 4:10 PM | LogFileAppender and Windows Service |
| Replies: 1 |
I would like to use log4net on a windows service, the log4netconfiguration that I have used is the same as I would use for a windowsor asp.net application, but the file does not seem to be gettingwritten out.I know that I have the configuration file working ok, as I can accessother config values, but the log4net is not working.Cheers David <log4net>&... |
| 05/11/2004 10:19 PM | questions |
| Replies: 3 |
If someone could shed some light on these questions, that would be terrific. Thanks.
· How are parameters added to the ADONetAppender (Exception's stack trace, hostname, other exception or custom information)? How are "dynamic" parameters passed to the appender?
· How to lock a standard set of appenders for a development fra... |
| 05/06/2004 8:06 PM | RE: how to log/trace all the operations performed by the operator? |
| Replies: 1 |
Paul,
Probably a question for the log4net-user list.
http://logging.apache.org/log4net/support.html
Are you sure that you want to log messages for every method entry and exit?
Do you think this will be useful for you or will it just generate a lot of
log messages that you never read and potentially make it harder to see the
genuine error messages.
There is a cost involved in add... |
| 05/04/2004 8:17 AM | COM and VB6 with Log4net? |
| Replies: 2 |
Peoples,I have the situation where I 70% of my components are written in .NET, butquite few large legacy components are hanging around in VB6.I would like to consolidate my logging framework, and as all the vb6components use the same custom built logging class, I would like to changethe vb6 logging class to use Log4NET.Has anybody used Log4Net from old COM based languages? I have a basic systemwor... |
| 04/30/2004 9:12 PM | BUG: Configuration is garbage collected |
| Replies: 1 |
Hi,
When trying to log my web application I noticed the following:
My FileAppender is garbage collected unless I keep a reference to it myself. Maybe this was intended to make sure I close the file appender after use?
Example:
public class WebForm1 : System.Web.UI.Page
{
 ... |
| 04/30/2004 5:20 AM | RollingFileAppender File Extension/Date Format |
| Replies: 4 |
I'm not sure if this is possible with log4net, but I would like to changeRollingFileAppender so the date file suffix is something other than the'.log' followed by the formatted date. Maybe something like this:LoggerFileName.YYYYMMdd.log- or -YYYYMMdd.LoggerFileName.logThanks... |
| 04/27/2004 8:38 AM | log4net and asp.net |
| Replies: 3 |
Hi all. I am having a bit of a problem configuring log4net for usewithin an ASP.NET application.Basically, the problem is that the log file is never written. I'velooked through all the examples and the old mailing list archive onSourceForge, but so far I've been unable to get it working. I am using.NET 1.1 and log4net 1.2.0 Beta8.I am using the web.config file to hold the log4net... |
| 04/27/2004 12:56 AM | CreateDirectory problem |
| Replies: 1 |
Hi, the problem that we're seeing is that application logging works fineon our development machines, but fails on the production server. Ourapplication is an ASP.Net web application running on Windows 2000, IIS 5.0,written in C#. The ASP.Net worker process is running under a restrictedaccount, and this account has been granted full control permissions on thesubdirectory for logg... |
| 04/24/2004 12:10 AM | Q: RollingFileAppender - How does one specify TopOfWeek RollPoint with a datepattern? |
| Replies: 2 |
I was hoping to get a rolling log file on a weekly schedule. Inoticed that there is a RollPoint enumeration with a TopOfWeek memberbut I'm not sure how to specify a weekly datapattern. Any advice on how to do this? Thanks in advanced. Kudos to all the developers, log4net... |
| 04/23/2004 2:54 AM | Remote logging to non-root logger |
| Replies: 1 |
I tried the RemoteLoggingServerPlugin example for beta8 at
... /examples/net/Remoting and it works GREAT, but the example
is written / configured to only log remote messages to the
root logger. I couldn't find anything in the API or documentation
that says how to log remote messages to a specific logger
(one other than root)
Can the RemoteLoggingServerPlugin be configured to log
r... |
| 04/22/2004 3:41 AM | RE: log4 net post: RE: configure different logfiles for different namespaces |
| Replies: 0 |
Marco,
> Now i want to disable logging to the <root>
> when an alternative logger is found.
> Is that possible?
If you mean that you have some appenders defined in the <root> and some in a
<logger> and you don't want the <root> appenders to be used as well as the
<logger> appenders then you need to set the Appender Additivity of the
logger. S... |
| 04/21/2004 1:08 PM | ColoredConsoleAppender works fine in ConsoleApplication. |
| Replies: 0 |
Nicko,
It's great. The ColoredConsoleAppender works fine when I implemented it in a
console application. Thanks much.
Paul
-----Original Message-----
From: Nicko Cadell [mailto:nicko@neoworks.com]
Sent: Tuesday, April 20, 2004 8:24 PM
To: 'Log4NET User'
Subject: RE: eg. for using TraceAppender
Paul,
> Thanks for the info. I could successfully trace to a text
> fi... |
| 04/21/2004 4:11 AM | RE: Windows 2003 Web Services, FileAppender and the Netowrk Service a ccount |
| Replies: 0 |
Sorry for the waste of bandwidth. I have
found my answer. For those that were unaware like I was, in WS2003, the ASP
worker process is run under the “Network Service” account NOT the
ASPNET account. So setting privileges for ASPNET does not gain you anything.
From: Denis, Rich
Sent: Tuesday, April 20, 2004 3:06
PM
To:... |
| 04/21/2004 4:05 AM | Windows 2003 Web Services, FileAppender and the Netowrk Service account |
| Replies: 0 |
Hello,
I was hoping someone could help me figure out some very
specific behavior. I have a web service that I have been trying to get logging
working for. When developing this on Windows XP logging works fine after
granting the ASPNET account access to write files to my logging directory. When
I migrate this to Windows 2003 there seems to be an issue.&... |
| 04/19/2004 11:54 PM | RE: problem with RemotingAppender Calls |
| Replies: 2 |
The current RemotingAppender does not deliver the events asynchronously. It
will buffer the events but once the buffer is full it will send them
synchronously.
The RemotingAppender in CVS will send the events asynchronously using a
ThreadPool worker request.
If you need this functionality now you can grab the latest version of the
appender here:
http://cvs.apache.org/viewcvs.cgi/l... |
| 04/19/2004 9:48 PM | RE:eg. for using TraceAppender |
| Replies: 3 |
Any sample code to implement TraceAppender in the application? How to usethe System.Diagnostics.TraceListener in the application?Paul-----Original Message-----From: Nicko Cadell [mailto:nicko@neoworks.com]Sent: Monday, April 19, 2004 6:30 PMTo: 'Log4NET User'Subject: RE: mailing list user preferences page for logging.apache.org?Clayton,Unfortunately I don't think that there is a user configuration... |
| 04/16/2004 4:41 PM | Bug reporting |
| Replies: 0 |
Hi,
Is the bug report on sourceforge already in use ??
I have sent a bug report recently, and I would like to have a feedback.
What do you think about the solution, How many time do you need to make a version with this fix ?
Thanks.
De Moor Yves - Yvesdm+-------------------------------------------------------------------------------------------------------------------... |
| 04/16/2004 12:57 AM | Q: Additional ILog Methods |
| Replies: 1 |
Have the following methods been considered for ILog?Thanks,Robpublic void Debug(string format, params object[] args)public void Info(string format, params object[] args)public void Warn(string format, params object[] args)public void Error(string format, params object[] args)public void Fatal(string format, params object[] args)public void Debug(Exception e, string format, params object[] args)pub... |
| 04/14/2004 9:53 PM | High CPU Utilization.. |
| Replies: 1 |
Hi....
While using log4Net, CPU utlization touces 95%...
My application doing a lot of logging, so high CPU utlization hits performance a lot... even a page accessed 5-6 times... running like it is accessed 1st time...
can any one know the reason.. or face smiliar problem..
Rohit
Yahoo! India Matrimony: Find your partner online. |
| 04/08/2004 11:28 PM | Release Schedule |
| Replies: 0 |
Hello,I am a new user to log4net and I would appreciate more information onthe release schedule. The Roapmap link currently has no information andthe beta download on SourceForge (1.2.0 Beta8) is almost 10 months old.I would like to use this in a commercial application, but we generallydon't like to use beta software. Any idea on when the final 1.2.0release will be?Thanks in advance!De... |
| 04/07/2004 4:43 AM | Trying to Understand A Couple Of Options |
| Replies: 1 |
Difference between BasicConfigurator Class and DOMConfigurator Class. Asbest as I understand,Basic ouputs to the console and doesn't have an XML file and DOM can be anyappender and musthave an XML file. Is this correct?What is [assembly: log4net.Config.Domain("SomeModule")] used for?What is the difference between instantiating a DOMConfigurator class andusing the following:[assembly:... |
| 04/07/2004 3:31 AM | Urgent EventLogAppender Question |
| Replies: 1 |
Hi,I am trying to set the event ID in the event log using EventLogAppender but with no success. I am using log4net-1.2.0-beta8. Can someone please provide some directions/sample code on how to achieve this ?Any help would be highly appreciated. Thanks in advance.Pravin |
| 04/05/2004 11:08 PM | mailing list user preferences page for logging.apache.org? |
| Replies: 2 |
Hi,
Is there a mailing list preferences page for the logging.apache.org mailing lists? I would like to change from digest mode but I can't figure out how to do this for the new lists. Thanks,
Clayton
|
| 04/05/2004 7:30 PM | configure different logfiles for different namespaces |
| Replies: 1 |
HelloHow can i configure log4net to use different logfiles for different namespaces. I want to cofigure my plugins to login into a different file that my base application.ThanksMarco |
| 04/02/2004 7:05 PM | Log4Net in COM+ |
| Replies: 1 |
I am using log4net for logging messages thru my application. The main components involved doing so are, 1. MyLogServer: This component is implemented by us which uses .Net EnterpriseServices and deployed as COM+ Server Application. This component calls log4net assembly to log the messages. This exposes every method which is there in log4net e.g. LogInfo, PushNDC, PopNDC etc. You can say t... |
| 03/31/2004 1:11 AM | Dynamic config: Changing log level of non-root logger |
| Replies: 1 |
So I've been playing with dynamic log4net configuration using a separatelog4net XML config file.When I change the file and add a new logger and set its level tosomething other than the root level (i.e. root is ERROR, logger1 isDEBUG), I still only get error messages (because it's just using theroot level).Note that I have already done DOMConfigurator.ConfigureAndWatch() onthis file and other chang... |
| 03/26/2004 8:22 AM | SmtpPickupDirAppender (Untriggered emails) |
| Replies: 1 |
Hello!
I am using SmtpPickupDirAppender in production environment. I have set the threshold level to "ERROR". I sometimes get the logs email for no apparent reason, i.e. even if there is no error in the system. Why is that?
Below is the configuration
<configuration>
<!-- Register a section handler for the log4net section --> <configSections>
<section name="log4net... |
| 03/24/2004 6:20 AM | ADONetAppender problems |
| Replies: 2 |
Hello,I have created an ADONetAppender using the following code: public ADONetAppender CreateADONetAuditAppender() { ADONetAppender ado = new ADONetAppender(); &nbs... |
| 03/21/2004 12:39 PM | log4net: Set Up Logging In Web Service |
| Replies: 2 |
I’d like to setup logging in a web service that I’m calling from a window’s application (c#). The windows app uses a single log to log events and user interactions, but I’d also like to log some of the routines inside the web service when my code gets there.
I’ve looked at the manual and placed this code in my web service:
using( log4net.NDC.Push("context") )
 ... |
| 03/16/2004 2:13 AM | RemotingAppender does not fail gracefully |
| Replies: 1 |
This may just be my opinion, but I would like to see the RemotingAppenderfail gracefully or silently if the remoting sink is not available. Theapplication shouldn't fail if the logging is properly configured, but itwill if the remoting sink is not available._________________________________________________________________FREE pop-up blocking with the new MSN Toolbar – get it now!http://clk.atdmt.c... |
| 03/16/2004 1:09 AM | appenders for remote log viewing |
| Replies: 1 |
I'm curious about remote log viewing, similar to using Chainsaw and theSocketAppender in log4j. I see the UdpAppender and the RemotingAppender, butI don't see any way to use either one. Implementing a SocketAppender soundslike a good idea to me. Is there a working solution out there?TIA,Kevin_________________________________________________________________Find things fast with the new MSN Toolbar ... |
| 03/12/2004 3:32 AM | Access modifier differences between log4net and log4j |
| Replies: 1 |
I apologize if this discussion has been taken up before. I've looked atboth the SF mailing list as well as the Apache one and I didn't seethis. I'm using log4net-1.2.0-beta8 on .NET Framework v1.1. Here's thequestion:Why are class fields in log4net specified with different accessmodifiers than those same fields in log4j?An example: In the PatternParser class in log4j there ... |
| 03/10/2004 9:09 PM | config-free log4net? |
| Replies: 9 |
Is there a way to “componentize” log4net? What I mean is there a way to package a standard/fixed set of appenders inside of a component so the developers need not add anything to their config files and simply make calls to my static wrapper methods. I am trying to abstract and blackbox log4net for developer’s applications.
I have heard similar questions beiing asked but have not seen any cl... |
| 03/06/2004 2:01 AM | No appender named [LogFileAppender] could be found |
| Replies: 0 |
What did I do wrong that I can’t even get the sample to work? I didn’t modify anything from the source tree.
C:\log4net_1_1_1\example\TestApp\bin\Debug>TestApp.exe
log4net:ERROR No appender named [LogFileAppender] could be found.
log4net:ERROR No appenders could be found for category (testApp.LoggingExample).
log4net:ERROR Please initialize the log4net system properly.
Mark Richm... |
| 03/04/2004 1:09 AM | RE: [Log4net-users] SocketAppender |
| Replies: 2 |
Kevin,
The short answer is that I don't know! But this is exactly the sort of thing
that the http://logging.apache.org project was setup to achieve.
Currently log4net does not have a built-in SocketAppender, the primary
network appender is the RemotingAppender. I don't know if log4cxx has a
SocketAppender and if it does what it puts onto the wire.
To get this to work you need to ... |
| 03/02/2004 11:29 PM | Having two levels of logging |
| Replies: 2 |
Hi,
As my code gets better and better. I’d like to put some classes to a “INFO” level, the rest should stay at a debug level.
What kind of configuration do I need to do to be able to set some namespaces to “info” and the root to “debug”?
I’m looking into the new site and finding information there is rather difficult L I can’t find a tutorial, I can’t find a descr... |
| 03/01/2004 9:47 PM | RE: Logging doesnot work in final production , works while debugging |
| Replies: 0 |
Sourabh,
Can you give me any more information as the difference between your
development and production environments?
Can you run log4net will internal logging enabled?
http://logging.apache.org/log4net/release/manual/faq.html#internalDebug
Cheers,
Nicko
> -----Original Message-----
> From: sourabh [mailto:sourabh.mishra@induslogic.com]
> Sent: 27 February 2004 12:3... |
| 02/29/2004 1:59 PM | New User Questions |
| Replies: 1 |
QUESTION: I am looking for some VB.Net samples and have not been able tofind any. This would be a lot of help.QUESTION/PROBLEM:Specify the version of log4net you are using. ->Latest Beta 1.2.0 Beta 8Specify what your assembly type is, i.e. exe or dll, and how your code islaunched, e.g. console application, windows application, ASP.NET project,COM+ hosted object, etc... ->Console ApplicationS... |
| 02/26/2004 10:09 PM | Restarting after shutdown |
| Replies: 1 |
I'm writing an app where I'd like to mail my logs at the end of each day. The problem is that creating a MailAttachment using current log file fails (I'm using the RollingFileAppender). If I shutdown the logging via LogManager.Shutdown() all is well - except that I can no longer log. Is there a way to restart logging after shutting down?
Ahti Hujanen
Binary Protocol L... |
| 02/26/2004 12:19 AM | Logger Repository? |
| Replies: 5 |
I have been using log4net for some time now on all my personal projects and recently have been tasked with giving a presentation on the log4net framework. I may asking a few of these over the next week but the first one that I have is on the loggerRepository. I am not too sure exactly what it is. Is it just a collection for the loggers? After reading the repository sectio... |
| 02/21/2004 2:23 AM | Should not PatternParser.Parse() be virtual? |
| Replies: 0 |
Otherwise there seems no way to overwrite it.
- Alexey.
|
| 02/21/2004 1:26 AM | There seems an easy fix for loading custom classes. What do you think? |
| Replies: 1 |
Hello,I have tried the following code in SystemInfo.getTypeFromString() and it works well on my computer. Instead of looking for a class in just relativeAssembly, all loaded assemblies are searched for the class. Do you think log4net can be updated to do the same?Sincerely, Alexey Solofnenko. public static Type GetTypeFromString(Assembly relativeAssembly,... |
| 02/19/2004 1:48 AM | Test Archive (20040218) |
| Replies: 0 |
Testing mailing list archival.
------------
Nicko Cadell
|
| 02/18/2004 5:08 AM | Logging Best Practices |
| Replies: 7 |
I'd like to get some feedback on best practices with log4net and logging in general. I've read through the documentation and a few articles about log4net however, I'd like to see how others are using it. Currently I'm just sticking debug messages inside my routines to see when I entered/exited. What else do you do? Thanks.
... |
| 02/18/2004 5:08 AM | Prevent Logging Headers/Footers |
| Replies: 1 |
I’m using a RollingFileAppender and when I set the root’s level-value to “OFF”, I’d like the header and footer not to be appended to my log file. How do I do that? Currently, the header/footer gets appended to my log each time by application starts and stops. Here’s my configuration code:
<log4net>
<root>
... |