Example:
>>> try:
... myapp.foo.doSomething()
... except Exception, e:
... print 'Thrown from:', modname(e)
Thrown from: myapp.util.url
In the above example, the exception was actually thrown at myapp/util/url.py module. Is there a way to get the __name__ of that module?
My intention is to use this in logging.getLogger functio...
Hi,
I want to parse my access log. Objective is to get the value of any query string parameter independent of its location.
Also is there any free URL parsing s/w or website.
...
How to go about implementing a user activity logger in MFC application.To get to know what are all the features are used most in an existing application.
...
I'm planning to add extensive diagnostics into my software. Right now I'm thinking about overall strategy of how to do this, because adding such code simply ad hoc can result in serious mess.
Do you have any experience in this?
I want to monitor:
How intensively objects from selected subset are created.
How intensively selected metho...
Hi,
Anyone knows the difference between System.Diagnostic.Trace and System.Diagnostic.TraceSource?
I've been using Trace for most of my projects and I just happen to found out about TraceSource the other day. They seems to offer similar API, is one better than the other?
...
is there any comprehensive list of all the conversion patters available for log4net, I can't even find them in the source code.
all i have found is this, shouldn't there be more patterns. for example how would i get the name of the hosting application?
another question is how can i add my own patters?
just as an example here is the co...
When I'm writing an API assembly for someone else to use, it would be useful to have some logging capability to help diagnose the clients' problems using it.
However, if I reference, for example, log4net in my assembly, this might clash with the version of log4net being used by the client's application.
I don't want to reinvent the whe...
The following log line in Rails log is common.
Completed in 0.13425 (7 reqs/sec) | Rendering: 0.03244 (29%) | DB: ).0863 (65%) | 200 OK [htt://localhost/reviews]
But in my development log file, I see the whole line except the (7 reqs/sec) part.
Why this reqs/sec is not shown in my log?? How can I make it appear??
...
I want to change the logging level depending if I'm debbugging or not, but I can't find a code snippet to check if the application is running in debug mode.
I'm using eclipse to debug the application, so if the solution only works within Eclipse it will be fine.
...
I want to grep my server logs to collect all of the unique IP Addresses, and also to see all of the requests for a specific page. What is the best way to do this?
...
On my application wide error handling I'm returning the host name to see what computer it happened on, application version, windows version, exception with all inner exceptions, and the stack trace.
What other information can you get while inside the MyApplication_UnhandledException method that would be useful for tracking down an error...
I am looking for a .net class to deal with logging various information to a file. The logger should have timestamps, categories for the logged data (to be able to differentiate between notificiation and errors), severity levels for errors, to be able to split the log file after it exceeds a certain size.
...
I noticed some confusion initially with my question. I'm not asking about how to configure a logger nor how to use a logger properly, but rather how to capture all of the information that would have been logged at a lower logging level than what the current logging level is in the exception message.
I have been noticing two patterns in ...
I have a bunch of console.log calls in my JavaScript.
Should I comment them out before I deploy to production?
I'd like to just leave them there so I don't have to go to the trouble of removing the comments later on if I need to do any more debugging. Is this a bad idea?
...
OK, so I know that from-import is "exactly" the same as import, except that it's obviously not because namespaces are populated differently.
My question is primarily motivated because I have a utils module which has one or two functions that are used by every other module in my app, and I'm working on incorporating the standard library ...
I am creating a java.util.logging.FileHandler that is allowed to cycle through files. When multiple instances of my application are run, a new log file is created for each instance of the application. I need to know what file is being used by the application because I want to upload the log file to my servers for further review. How can ...
I was wondering if somebody use syslog to log his web application errors/warning/info ? It could be quite useful in a deployment environment with a lot of servers.
If yes, what kind of client visualisation you can get to watch errors and grouping the same errors into batch?
Do you use other techniques than syslog to achieve this kind o...
I've just started working on a brownfield ASP.NET 2.0 Web Application. As with a lot of brownfield applications, the architecture, and specifically the exception logging architecture, is inconsistent and in some places, missing or incorrect (swallowing exceptions, re-throwing, using them for control logic etc)
As a starting point for br...
I have 3 websites on a Windows 2003 server with IIS 6. They all have the same logging options set up. (As far as I can tell) However, one of the sites is only logging 2 .NET applications, and is not logging anything else on the site, even though there are thousands of files. The other 2 sites on the server seem to be logging everything a...
In my application, I have two classes: a logger that actually logs to the database and a dummy logger that does nothing (used when logging is disabled). Here is the entire DummyLog class:
class DummyLog(object):
def insert_master_log(self, spec_name, file_name, data_source,
environment_name):
pass...