Lately, I have taken to the pattern of having a lot of diagnostic logging in parts of my code, that makes use of lambda expressions/anonymous delegates like so:
MyEventManager.LogVerbose( LogCategory.SomeCategory, () => String.Format(msg_string, GetParam1(), GetParam2(), GetParam3() );
Notice that the second argument to LogVerbose is ...
I would like to find a way to see what happens while my XAML is being loaded. What classes are being instantiated, and in what order? Which properties are being set, to what values, and in what order? Which methods are being called (e.g. BeginInit, EndInit, etc.), in what order, and with what parameters? That sort of thing.
(If anyone's...
I am working on a Log4Net configuration that will log all unhandled exceptions. I need certain properties, based on user, to be added to each log entry. I have set this up successfully in the following manner in my Application_Error event. Here is my complete global.asax
Imports log4net
Imports log4net.Config
Public Class Global...
Hello,
I have multiple text files with logged data like this:
6/23/09 17:00 0.443
6/23/09 17:05 0.443
6/23/09 17:10 0.443
6/23/09 17:15 0.443
6/23/09 17:20 0.443
6/23/09 17:25 0.443
6/23/09 17:30 0.443
...
I'd like to create a webpage that displays this data from different files in a more readable manner. I'd like to create ...
My Glassfish server logs messages like this every 10 minutes or so:
[#|2009-07-01T10:10:03.373+0930|WARNING|sun-appserver9.1|javax.enterprise.system.stream.err|_ThreadID=21;_ThreadName=Timer-13;_RequestID=30966ccf-eac6-4cff-8256-22bc31862686;|
java.lang.NullPointerException: name cannot be null
at javax.management.ObjectName.constru...
I am launching my JBoss server in eclipse, and so standard out/err displays in the Console view. But there are other logs being generated by log4j, and so I need to be able to monitor some of those as well. Is there anyway to "tail" an arbitrary file - with the nice source code hyperlinks that the Console view provides, of course.
(I am...
I configured message tracing for my WCF webservice like this:
<!--TRACING -->
<system.diagnostics>
<sources>
<source name="System.ServiceModel" switchValue="Verbose, ActivityTracing" propagateActivity="true">
<listeners>
<add name="xml" />
</listeners>
</source>
<source name="System.S...
I'm trying to figure out the best way to do error logging in rails using a database (in this case MySQL) as a backend.
It looks like the two popular logging frameworks within rails are the built-in Logger framework and Log4r.
However, as far as I can tell, neither of these support database logging to a database without writing some cus...
Hi, I am trying to send an exception caught in Controller to trace.axd page, but I cant seem to figure it out.
I have
<trace enabled="true" localOnly="false" mostRecent="true" pageOutput="false" />
in web.config, and my inteded reaction to an exception is
catch (Exception e)
{
ViewData["error"] += "Is not number!";
Trace.Trac...
Does anybody have any advice on how to minimize my logs for a web application?
Right now, I'm logging every error. So if there is a situation where an error occurs on every request (a db connection problem for example), it might get logged for every user on every request. As you can imagine, it doesn't take too many users doing too ma...
I am running an experiment distributed over several computers using the Parallel computing toolbox. I want to be able to produce a log of the progress of the experiment (or of any error occurring) and save this info in a file while the processes are running. What is the standard way to do it?
EDIT:
I use embarrassingly parallel
I want...
I am trying to implement some logging in my webpart. I implemented a Custom trace provider implementation which writes Log messages into the 12 hive logs as has been described here:
http://msdn.microsoft.com/en-us/library/aa979522.aspx
I have wrapped the above code into a dll called logging.DLL.
I am referencing this DLL in my webpar...
Hi all,
I have recently found a bug that causes a NullPointerException. The exception is caught and logged using a standard slf4j statement. Abridged code below:
for(Action action : actions.getActions()) {
try {
context = action.execute(context);
} catch (Exception e) {
logger.error("...", e);
break;
...
We build complicated console-based tools that produce a lot of commentary on the console. These tools process a lot of data and so runs are expensive and we don't like to do them more often than necessary, especially during testing where we already have to run them repeatedly. During such tests, we often log the result to a file to ca...
I am looking for a library that does logging on a higher abstraction layer then Log4J or similiar.
Instead of calling the framework once for every row of logging needed, I want to call it once per at the beginning of the action, once at the successful ending and possibly once if an exception occured.
The logging framework should then c...
Hi,
I have been working with Exceptions lately. I think it makes sense to log uncaught Exceptions, because it greatly helps developers to take care of possible problems in the source by simply looking at Exception log. However, when an exception is dealt with, is there a need to log it any longer? Yes, to some extent. If you have "bad" ...
So I use a lot of trace-code/logging when starting a new project, or debugging an existing one. I was wondering what techniques do you use to manage it, as I always end up deleting it before doing a commit, and then have to rewrite it if ever something else goes wrong.
I was thinking about having a development branch with all the trace-...
We run our web app in an Apache Tomcat 6 container. Our code uses SLF4J and Logback and rolls/purges just fine. The Tomcat log (catalina, stdout, etc.) just get deleted on a Tomcat service restart.
The problem is we also are doing some HTTP logging. As far as anyone can tell it's coming from this line in the Tomcat server.xml file.
<Va...
I understand that Python loggers cannot be instantiated directly, as the documentation suggests:
Note that Loggers are never
instantiated directly, but always
through the module-level function
logging.getLogger(name)
.. which is reasonable, as you are expected not to create logger objects for every class/module for there is a...
Hello
I'm developing an ASP.NET (3.5) webservice application, hosted on IIS6/Win2003. The webservice logs the timestamp of the call at start and just before the return. This allows me to query the time-taken. I've also added time-taken to the standard IIS log (W3C extended)
The webservice is then stress-tested (5 threads, 200 calls per...