logging additional fields

2004-12-08 Thread Simon Wallis
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.ph

RE: Error using RemotingAppender: can't find assembly log4net

2004-12-08 Thread Nicko Cadell
It looks like the exception is being generated by the remoting server in the ObjectReader.Deserialize methods. This is then being thrown back to the client. How have you setup the remoting server listening on 8085? Nicko > -Original Message- > From: Simon Wallis [mailto:[EMAIL PROTECTED

Error using RemotingAppender: can't find assembly log4net

2004-12-08 Thread Simon Wallis
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:

RE: Reporting events back to Unit-test

2004-12-08 Thread Nicko Cadell
In the unit test you could add a MemoryAppender and then at the end of the operation query it for events that have been logged. log4net.Appender.MemoryAppender mem = new log4net.Appender.MemoryAppender(); mem.Name = "MemoryAppender"; mem.ActivateOptions(); log4net.Repository.Hierarchy.Hierarchy h

Re: Using RollingFileAppender

2004-12-08 Thread Eric Means
I don't think you can do this in log4net unless you implement your own appender. You could use the RollingFileAppender with appendtofile=true and set up a recurring Scheduled Task that deletes the file created 7 days ago (runs every day at midnight). On Wed, 08 Dec 2004 09:34:03 -0600, Shrivasta

Re: Finding out whether a specific appender is attached

2004-12-08 Thread Oliver Sturm
Nicko Cadell wrote: You may be able to use the OutputDebugStringAppender. This appender uses the OutputDebugString API. The VisualStudio Debugger catches this output and displays it in the Debug Output window. This only works for applications that the debugger launches rather than ones is attaches

Re: Log4Net API to get appender config properties

2004-12-08 Thread Oliver Sturm
Hey Nicko, Nicko Cadell wrote: Interfaces have been used to allow alternative implementations to be substituted. At the current time there are no alternative implementations of ILoggerRepostiroy and ILogger in the log4net source, however you could supply your own alternative implementation, which w

RE: Using RollingFileAppender

2004-12-08 Thread Shrivastava, Ravi
I have tried that but it seems to either overwrite the logs (appendtofile=false) if I run the app multiple times during the same day or keeps appending to the file (appendtofile=true) even after 1 week has gone by. Keep in mind I want to have a week worth of logs - come next Monday, for ex, and I'd

RE: Using RollingFileAppender

2004-12-08 Thread Andrew Elmhorst
Try setting the DatePattern property on the RollingFileAppender to "'.''.log'" This should create backup log files in the pattern [logfilename].Monday.log. This should get you close to what you want. You can also set the StaticLogFileName to false and the RollingFileAppender should write direc

RE: Finding out whether a specific appender is attached

2004-12-08 Thread Nicko Cadell
Oliver, > Now, on my development system, I like to set up log4net to > use a TraceAppender so that I can easily see the log4net > output in Visual Studio when debugging. Of course, I can't > use my own TraceListener and the log4net TraceAppender at the > same time. So I'd like to find out (du

RE: Log4Net API to get appender config properties

2004-12-08 Thread Nicko Cadell
Oliver, > > log4net.Repository.Hierarchy.Hierarchy h = > >(log4net.Repository.Hierarchy.Hierarchy)log4net.LogManager.Ge > tLoggerRepository(); > > > > > Why do you assume that this ILoggerRepository is really a Hierarchy? Currently the only implementation of the ILoggerRepository interface is

RE: Reporting events back to Unit-test

2004-12-08 Thread Andrew Elmhorst
Log4net comes with MemoryAppender that stores all logged event in memory. This would be useful for a Unit Test, as it can check the Events property and get back an array of all the LoggingEvents that have been logged. Regards, Andrew Elmhorst -Original Message- From: Olav Benum [mailto:[

RE: Exception Logging

2004-12-08 Thread Marcel Kunz
Because your StackTrace is Null/Nothing. As long as you don't throw the exception the StackTrace will be 'Null'. Tschüss Marcel Vitodata AG, Marcel Kunz Dipl. IT Ing. FH Deisrütistrasse 10, CH-8472 Ohringen Telefon +41 (0)52 320 55 55, Fax +41 (0)52 320 55 66 Telefon direkt +41 (0)52 320 56 64

Exception Logging

2004-12-08 Thread Annette Sündermann
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 log

Re: Reporting events back to Unit-test

2004-12-08 Thread DWilliams
I would create a special appender for the unit test runs.  I would use a remoting appender that the unit test could attach to and read.  As a separate appender does not stop the original appender(s) from also executing, so long as the thresholds are the same, you know that the same informatio

Reporting events back to Unit-test

2004-12-08 Thread Olav Benum
Hi I am using NUnit and log4net, and I would like to use log4net to report certain 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 inspect it at regular i

Using RollingFileAppender

2004-12-08 Thread Shrivastava, Ravi
Is there a way I can configure RollingFileAppender to create a log file per day, append to it if it's the app is run multiple times during that same day, but overwrite it the following week. Ex: Have Monday.log, Tuesday.logetc., which show me logged activity for all of that day - on the follow

Re: Log4Net API to get appender config properties

2004-12-08 Thread Oliver Sturm
Hey Nicko, you may have noticed that you answered my recent question ("Finding out whether a specific appender is attached") with this, too (although I haven't tried it yet). Just two comments inline below: Nicko Cadell wrote: You can get all the current appenders by using a method like: public

RE: Log4Net API to get appender config properties

2004-12-08 Thread Nicko Cadell
You can get all the current appenders by using a method like: public static log4net.Appender.IAppender[] GetAllAppenders() { ArrayList appenders = new ArrayList(); log4net.Repository.Hierarchy.Hierarchy h = (log4net.Repository.Hierarchy.Hierarchy)log4net.LogManager.GetLoggerRepo sitory(); a

RE: Log timestamp in UTC

2004-12-08 Thread Nicko Cadell
There are a number of guidelines regarding the issues of the DateTime type: http://msdn.microsoft.com/netframework/default.aspx?pull=/library/en-us/ dndotnet/html/datetimecode.asp http://weblogs.asp.net/bclteam/archive/2004/05/21/136918.aspx http://weblogs.asp.net/bclteam/archive/2004/06/01/145487

Re: equivalent of Log4xxx for ASP (not ASP.Net)

2004-12-08 Thread Jaroslaw Kowalski
NLog (http://nlog.sourceforge.net) is a .NET logging library similar to log4net. It has a COM binding that can be used to output messages from ASP web pages. It also features the C/C++ language logger (NLogC) for situations where you cannot use COM. (For this, you have to use the latest subversi

equivalent of Log4xxx for ASP (not ASP.Net)

2004-12-08 Thread Jérémie LOPEZ
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.  

RE: Build problem

2004-12-08 Thread Nicko Cadell
Jeremy, This is a DOS quoting issue. This can also be fixed by changing the build.cmd file to add quotes around the %LOG4NET_DIR%\build\lib\nant\nant.exe on lines 35 and 41 so that it reads "%LOG4NET_DIR%\build\lib\nant\nant.exe" "-buildfile:%BUILD_FILE%" %1 %2 %3 %4 %5 %6 %7 %8 and "%LOG4NE

RE: Parsing XmlLayout formatted events

2004-12-08 Thread Nicko Cadell
> -Original Message- > From: Simon Wallis [mailto:[EMAIL PROTECTED] > Sent: 02 December 2004 19:53 > To: log4net-user@logging.apache.org > Subject: Parsing XmlLayout formatted events > > Is there an easy way to parse XmlLayout-formatted events? I > was hoping for something like Loggin

Finding out whether a specific appender is attached

2004-12-08 Thread Oliver Sturm
Hey, I have an application that uses another assembly, written earlier, where a System.Diagnostics was used for debugging output. As the new application is supposed to use log4net for logging, I want to route that old Diagnostics stuff into log4net and I have successfully created my own derived

RE: Parsing XmlLayout formatted events (or how to set up Chainsaw and log4net)

2004-12-08 Thread Nicko Cadell
> The only differences are, in log4net config, I have: > > > > (no ", log4net") on the end, not sure what that does. The ", log4net" postfix on the type name "log4net.Layout.XmlLayoutSchemaLog4j, log4net" is the name of the assembly to load the type from. This is part of the standard .NET (Ty

RE: Setting up Chainsaw and log4net

2004-12-08 Thread Nicko Cadell
Ron, Be default the XmlLayoutSchemaLog4j does not include the caller location information as it can be expensive to generate. To include it you need to set the LocationInfo property to true on the layout, for example: Nicko > -Original Message- > From: Ron Grabowski [mailto:[EMAIL