Re: Unusual Exception Behaviour

2008-07-20 Thread Vinay Sajip
On Jul 18, 5:12 pm, "Robert Rawlins" <[EMAIL PROTECTED]> wrote: > > This is really quite frustrating as I'd much rather use a conf file than > work this programmatically. I get the feeling that it's because in the > config file I was not attaching any handlers to the root logger, but I don't > know

RE: Unusual Exception Behaviour

2008-07-18 Thread Robert Rawlins
> The logging configuration functionality provided by fileConfig is all- > or-nothing, i.e. it does not support incremental configuration. > > Do you know if any libraries you depend on use fileConfig? > > If you use programmatic configuration only, and don't use fileConfig > at all, does everythin

Re: Unusual Exception Behaviour

2008-07-18 Thread Vinay Sajip
On Jul 18, 12:03 pm, "Robert Rawlins" <[EMAIL PROTECTED]> wrote: > > Yeah it's got me a little bemused to be honest, I've tried playing around > with configuration options this morning and not been able to achieve > anything that works properly. > The logging configuration functionality provided b

RE: Unusual Exception Behaviour

2008-07-18 Thread Robert Rawlins
Hi Mk, > To tell the truth I have never used logging module extensively, so I'm > not expert in this area and can't help you there. > > However, it seems to me that you may have stumbled upon some subtle bug > / side effect of logging module that could cause some side effects in > exceptions. O

Re: Unusual Exception Behaviour

2008-07-18 Thread mk
Ok, Just to add a little interest, when I comment out the configuration line for my logging, like so: #logging.config.fileConfig("/myapp/configuration/logging.conf") It appears to throw the exceptions as normal :-) :-s To tell the truth I have never used logging module extensively, so I'm

RE: Unusual Exception Behaviour

2008-07-17 Thread Robert Rawlins
>> That's seriously weird. What's your Python version and platform? On my >> Windows and Linux machines, with more recent Python versions the above >> trick works flawlessly. >> >> Check your environment, namely PYTHON* variables. There may be >> something causing this behaviour. Unset them. >>

RE: Unusual Exception Behaviour

2008-07-17 Thread Robert Rawlins
> That's seriously weird. What's your Python version and platform? On my > Windows and Linux machines, with more recent Python versions the above > trick works flawlessly. > > Check your environment, namely PYTHON* variables. There may be something > causing this behaviour. Unset them. > > Check

Re: Unusual Exception Behaviour

2008-07-17 Thread mk
http://linux.byexamples.com/archives/365/python-convey-the-exception-traceba ck-into-log-file/ if __name__=="__main__": try: main() except: print "Trigger Exception, traceback info forward to log file." traceback.print_exc(file=open("errlog.txt","a"))

RE: Unusual Exception Behaviour

2008-07-17 Thread Robert Rawlins
Hi MK, >>Robert Rawlins wrote: >> >> I certainly like that implementation for logging the exceptions, however, at >> the moment I don't even know where the exceptions are occurring, or what >> type they are, could I still use this method to log any and all exceptions >> raised in the application?

Re: Unusual Exception Behaviour

2008-07-17 Thread mk
Robert Rawlins wrote: I certainly like that implementation for logging the exceptions, however, at the moment I don't even know where the exceptions are occurring, or what type they are, could I still use this method to log any and all exceptions raised in the application? Sure. I'm a little

RE: Unusual Exception Behaviour

2008-07-17 Thread Robert Rawlins
Hi Mk, > Why not capture exceptions themselves to a log file? > > http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/466332 Thanks for the reply mate, I appreciate you getting back to me so quickly. I certainly like that implementation for logging the exceptions, however, at the moment I do

Re: Unusual Exception Behaviour

2008-07-17 Thread mk
I have looked through the application for any unusual or bare try/except blocks that don’t actually do anything with the except just in case any of them are causing the issue but can’t seem to see any. Why not capture exceptions themselves to a log file? http://aspn.activestate.com/ASPN/Cookbo

Unusual Exception Behaviour

2008-07-17 Thread Robert Rawlins
Hello Chaps, I have an unusual situation with my application which I've also seen once or twice in the past but never found a solution too. Basically the application stops properly reporting Exceptions when they are thrown. My application logs extensively to a file using the python logging