Re: Advanced Configuration

2005-06-02 Thread Ron Grabowski
How would you pass in a non-string into the conversion pattern? --- Weston Weems <[EMAIL PROTECTED]> wrote: > No... I honestly didnt have anything in mind specifically... just > didnt know if the conversion would just take string type values... > > I guess its not a big deal at all.. just cur

Re: Advanced Configuration

2005-06-02 Thread Weston Weems
No... I honestly didnt have anything in mind specifically... just didnt know if the conversion would just take string type values... I guess its not a big deal at all.. just curious On 6/2/05, Ron Grabowski <[EMAIL PROTECTED]> wrote: > I don't understand your final question. What are you trying t

Re: Advanced Configuration

2005-06-02 Thread Ron Grabowski
I don't understand your final question. What are you trying to log? "just get to use simple types" Are you wanting to log the output from something like a BinaryFormatter? --- Weston Weems <[EMAIL PROTECTED]> wrote: > Well my main goals are: > > log additional info (totally understand how to

Re: Advanced Configuration

2005-06-02 Thread Weston Weems
Well my main goals are: log additional info (totally understand how to do that one) explicitly log to email etc from code (I guess I could just get a logger thats designed to do that and only that... and I can prolly just filter on log text, so that stuff thats database related might be emailed,

Re: Advanced Configuration

2005-06-02 Thread Ron Grabowski
Log statements are sent to a Logger which in turn writes to one or more Appenders. First you must get a Logger. Most people use the class name as the name of the logger: namespace Company.Project { public class Foo { ILog log = LogManager.GetLogger(typeof(Foo)); public void Test

RE: Advanced Configuration

2005-06-02 Thread Howard Weisberg
Re your question (2) -- I also had trouble figuring out how to do it from the documentation, but here is the solution I found -- no idea whether it is the best solution. In the code, store a process-wide value, e.g.: log4net.GlobalContext.Properties["pid"] = Process.GetCurrentProcess().Id

Advanced Configuration

2005-06-02 Thread Weston Weems
I've just begun to play with log4net after trying endlessly to get Enterprise Library working as I'd like it. I do have a few questions I was unable to find the answers for on my own (reading documentation/manual on logging.apache.org) this is all .net 1.1 and using 1.9b or whatever the latest bu

RE: ASP.NET Blocking Problem

2005-06-02 Thread Nicko Cadell
The issue is that the AppenderSkeleton takes a conservative implementation attitude and provides the basic locking that most appender subclasses would need. It locks on the appender instance, this does serialise the outputting for that appender instance. While this is good for many appenders it doe

RE: Log4net threadsafe storage

2005-06-02 Thread Ping Xie
Thank you very much for your response. Ping Xie CACI 4831 Walden Lane Lanham, MD 20706 [EMAIL PROTECTED] (301) 306-8200 - Main (301) 306-2829 - Direct "Nicko Cadell" <[EMAIL PROTECTED]> 06/02/2005 03:16 PM Please respond to "Log4NET User" To "Log4NET User" cc Subject RE: Lo

RE: A couple of questions and comments

2005-06-02 Thread Nicko Cadell
> -Original Message- > From: Schweizer Andreas [mailto:[EMAIL PROTECTED] > Sent: 31 May 2005 11:25 > To: 'Log4NET User' > Cc: Borlet-Hôte Alain > Subject: RE: A couple of questions and comments > > Hi list, hi Ron! > > first, thank you Ron for your detailed answer. > > > It sounds li

RE: Log4net threadsafe storage

2005-06-02 Thread Nicko Cadell
The MDC (and in 1.2.9 the ThreadContext) use thread local storage. Values stored in the MDC are specific to each managed thread. If managed threads are reused, as in ASP.NET, then any previously set MDC values may still be set for the next request. Nicko > -Original Message- > From: Ping

RE: Calling method

2005-06-02 Thread Nicko Cadell
Paul, You are explicitly asking for the logger called 'Jkd.Vor.Utilities.Logger' and using that one logger instance. The use of: System.Reflection.MethodBase.GetCurrentMethod().DeclaringType Is a convenience if you want to copy the same boilerplate code into each class, however it is just equiva

RE: AdoNetAppender losing first entry

2005-06-02 Thread Nicko Cadell
Richard, This looks like bug exactly as you have described. If you could go ahead and create a bug for this in JIRA http://issues.apache.org/jira/browse/LOG4NET that would be great. I will look at rewriting that chunk of code with rather more comments. Cheers, Nicko > -Original Message-

RE: ASP.NET Blocking Problem

2005-06-02 Thread Darren Blackett
App Block - not yet. I'll do some digging in there and see if, for this type of logging it is a better fit. However, I was hoping to get the solution using what I'd already done with log4net. I'll do some digging in nlog. Overrigding the doappend call is a potentially viable option, however, wo

RE: How to create XmlAppender

2005-06-02 Thread Nicko Cadell
[Moved to the log4net-user list] You can configure a FileAppender to use the built-in XmlLayout, this will generate a file containing the logger, level, message and more for each event. The configuration is as follows: If you need a different XML output format then you can write your ow

Re: ASP.NET Blocking Problem

2005-06-02 Thread Ron Grabowski
Nicko checked in a MSMQ appender into source control a few days ago. I'm not familiar with MSMQ in terms of what it guarantees to capture (is it just a sink?). You could try writing things to there then write another program to extract the data out and insert it into the database. I glanced at NLo

RE: ASP.NET Blocking Problem

2005-06-02 Thread DarrenBlackett
A nice idea, unfortunately though I'd still be blocked when I talked to the appender :( -Original Message- From: Kevin Williams [mailto:[EMAIL PROTECTED] Sent: 02 June 2005 15:27 To: Log4NET User Subject: Re: ASP.NET Blocking Problem [EMAIL PROTECTED] wrote: > My concern with implementin

Re: ASP.NET Blocking Problem

2005-06-02 Thread Kevin Williams
[EMAIL PROTECTED] wrote: My concern with implementing buffering is that if my appdomain dies I will lose the contents of the buffer. I've seen the app domain die in testing and can't afford to lose the information in my live application. I also have to guarantee that this data has reached the da

RE: RE:ASP.NET Blocking Problem

2005-06-02 Thread Corneliu I. Tusnea
Hi Darren, An idea would be to extract the DoAppend function into a separate class (DoActionHelper) Then, in the DoAction of the AppenderSkeleton, you check the active thread's named slots if you have an instance of your class for that specific thread. If you do, you reuse the class for that thre

RE: RE:ASP.NET Blocking Problem

2005-06-02 Thread DarrenBlackett
I have verified that I have one instance of the appenderskeleton and that every request I have is contending for the lock in the DoAppend. With upwards of 300 clients even implementing buffering I would pile up behind this lock (especially if I had more than one appender). My concern with implemen

RE: RE:ASP.NET Blocking Problem

2005-06-02 Thread Ron Grabowski
According to this website: http://www.connectionstrings.com/ Sql Server allows for Max Pool Size and Min Pool Size to be specified in the connection string. Have you verified that only a single connection is being used? Have you verified that log messages are being lost when buffering is on? Whe

RE: RE:ASP.NET Blocking Problem

2005-06-02 Thread DarrenBlackett
The other thing I would add is that it seems strange to introduce this choke point.  My database access has x amount of concurrent connections available to it, however, because of this behaviour (and without the buffering on) I'm reducing myself to 1 connection which doesn't seem very effici