logging

How do you debug a Sinatra app like a Rails app?

In my main Sinatra controller, I want to debug the params hash after it is POSTed from a form. I have added: puts params.inspect and set :logging, :true The params.inspect works if everything goes well. But if an error happens before the controller is executed I'm not getting any information about the error like I would in Rails b...

Where does WCF log the stuff if wmi is enabled?

<system.serviceModel> <diagnostics wmiProviderEnabled="true"> I recently stumled across this setting in WCF, where you can enabled WMI logging. Where does it log to? and what is logged? There is no mention of that.. Pleaselet me know... ...

Log(ger) Variable Declaration

In the majority of cases I see Log instances declared as follows: public static final Log LOG = LogFactory.getLog(MyClass.class); I assume this means that the log configuration is loaded when the MyClass is loaded and is therefore set in stone until the MyClass is either reloaded or the JVM restarted? So, if this assumption is correc...

commons-logging config: use SimpleLog & set debug level

I have a commons-logging configuration question. I want it to use SimpleLog (instead of java.util.logging) and log all messages with level >= debug (instead of info). ...

Join xml files with XmlReader

I am joining 3 xml logfiles with LINQ to XML by id, but when my logfiles become too big, LINQ to XML doesn't work anymore, so i have to use XmlReader. But now I am asking myself how to do this? Should i loop through every document for each id, or is there a more simple elegant solution? Anybody? ...

log4net log all unhandled application errors

Can you point me to some tutorial or samples on how I can log all un-handled exceptions that are occurring on my mvc web app using log4net. Thank you ...

How to detect when main thread terminates?

What I need to know: I would like to detect when a the main thread (process?) terminates so that I can ensure certain actions are performed before it is terminated. What I have found myself: I found the events AppDomain.DomainUnload and AppDomain.ProcessExit. AppDomain.DomainUnload seems to work with non-applications like MbUnit. App...

Preventing Overwrite of flashlog.txt / filtering flashlog.txt in Flex

Hello, I am trying to make an application that logs particular events in flashlog.txt (the current location) using the trace() function. Right now, the application correctly logs to this file when I trigger the events (pressing a button/closing a dialog). What I would like to have happen is for this data to be saved forever (or until ...

How to disable Elmah memory logging?

We're using Elmah in an asp.net 2.0 web app. Is there a way to disable the default Memory Log provider? In other words, we're logging to SQL Server and because of this we want to completely eliminate the MemoryErrorLog provider that is true by default. Thanks, Jason ...

save python output to log

I have a python script the runs this code: strpath = "sudo svnadmin create /svn/repos/" + short_name os.popen (strpath, 'w') How can I get the output of that command stored in a variable or written to a log file in the current directory? I know, there may not be an output, but if there is, I need to know. ...

Compare log4j and Logger

How does The JDK's Logger compare to Apache log4j? Which one is better for new projects that target Java 6? How do they compare in terms of flexibility and configurability? ...

Configure the root logger with java logging API

how can I configure the behaviour of the root logger in the logging api? I don't want to configure the behaviour of each logger separately, instead it would be very convenient if I have a single property file where I can set the behaviour of all loggers. ...

SQL Server spams in event log on every call of extended proc

I've wrote an extended stored procedure in dll. Every time I call it, SQL Server wrote useless "Information" in Windows Event Log (Windows Logs\Application): Event Type: Information Event Source: MSSQLSERVER Event Category: (2) Event ID: 17055 Date: 04.09.2009 Time: 14:54:57 User: N/A Computer: 4STORYTESTDB Description: 8...

JPA Instrumentation

Is it somehow possible to see the DDL produced when opening a EntityManagerFactory in JPA? I seem to be having some problems but no errors are produced. I don't see any sort of log file and no output is written to StdOut or StdErr. I have a log4j.properties in src/main/resources: log4j.appender.stdout=org.apache.log4j.ConsoleAppende...

Logging multithreaded processes in python

I was thinking of using the logging module to log all events to one file. The number of threads should be constant from start to finish, but if one thread fails, I'd like to just log that and continue on. What's a simple way of accomplishing this? Thanks! ...

Logging, StreamHandler and standard streams

Hi, I can't figure out how to log info-level messages to stdout, but everything else to stderr. I already read this http://docs.python.org/library/logging.html. Any suggestion? ...

NLog in ASP.NET - what permissions should the log file have (archiving problem)

Hi - For an ASP.Net environment what permissions should the logging file created by NLog have ? The ASP.Net virtual directory is using an application pool which has an 'Application Pool Identity' of 'Network Service'. When I grant 'Network Service' change rights to the NLog output file all is well until the archiving condition causes th...

My rails tasks call model methods. How do I handle logging?

In order to keep things DRY and share functionality between my Rails tasks and my "app", I put a lot of functionality in models. In my models I have "logger.info ..." but this is problematic when I call the model functions from rake tasks because nothing is logged. Is it possible to redirect logger for only rake tasks but have it log n...

How to configure my log4j ( using Glassfish ) to log in the logs directory, not in config?

Hi, I have the following line in my log4j.properties file: log4j.appender.logfile.File=MyApplication.log My log file appears in MyDomain/config directory, but I would like it to land in the MyDomain/logs directory. How can I achieve that? I am not allowed to modify the startserv script. Thanks in advance for your help! ...

Is GNU's nana library dead? Is there a successor in use?

Looking at http://savannah.gnu.org/projects/nana/ it seems that the last work was done on Nana four years ago, and the official gnu.org homepage for nana is a placeholder. Given how inactive projects tend to suffer from bitrot: Has the project died? Is there a successor? Do folks have a different assertion/logging library for C/C++ ...