logging

What is the fastest way to inject some logging on a live web application?

I have a live web application that is failing in one specific scenario, and locally it works fine. I don't have remote debugging setup, and I want to check the value of some of the variables in the code. What would be the fastest way for me to log/email/debug the code to view those values? Just to be clear, there is no error/exception...

Catching every exception in j2ee webapps

First, I am throwing run time exceptions for all unrecoverable exceptions, this causes these exceptions to travel up to the conainter, where I currently use an error page (defined in web.xml). In this error page is a scriptlet that invokes the logger. The issue I am having with this is that the exception is no longer on the stack at thi...

log4net: using more than one log level with the same appender configuration

Hello everyone! A couple of weeks ago I've discovered log4net and I couldn't be happier with my initial results. So far I've been using the factory settings (BasicConfigurator.Configure()), but now I feel like going a step further and trying some customized configurations. I've wrestled my way to make the application read the configura...

How to keep logs in C#?

This is a WinForm written in C#. Lets say I'm generating a random named text file in my selected directory. When the button is clicked teh first time, i write the data contained in the textboxes into that text file. If the user wants to do the same thing with different data in the textboxes then the click on the button should write the n...

Who should log an error/exception

I am trying to figure out the best practices when loggin exceptions. So far, I am logging every time I catch an exception. But when a lower lever class catches an exception (say, from the database layer), and wraps it in our own application exception - should I also log the original exception there, or should I just let the upper lever ...

How to write my own Server Logging script?

I need to log the hits on a sub-domain in Windows IIS 6.0 without designating them as separate websites in the IIS Manager. I have been told this is not possible. How can I write my own script to do this? I'm afraid google analytics is not an option due to the setup, I just need access (i'm guessing) to the file request event and its pr...

Log warnings into a table

I found the following code on mysql forge site. MySQL Proxy : An easy way to log all warnings and errors into a MySQL table. http://forge.mysql.com/tools/tool.php?id=133 This may sound too basic, but from where do I start if I need this functionality. ...

Logging Application Block

I'm using the Logging Application Block in my ASP.NET application and want to convert the application to a Sharepoint WebPart. It all works fine as long as I change: <trust level="WSS_Minimal" originUrl="" /> to <trust level="Full" originUrl="" /> If not I get an exception in the logs: Failed to add webpart *************255Fcatal...

How to get started on a diet logging script in php/mysql/jquery

Hey guys, hope this isn't too much of a n00b question I'm mainly a front end developer that has recently started to do some back end programming. The script I'm working on is pretty simple (in theory). I just don't know where to begin and was hoping for some advice that will lead me in the right direction. -The script is essentially a ...

How does one make logging color in Django/Google App Engine?

If one iswriting a Django/ Google App Engine application and would like to have logs that are conveniently conspicuous based on color (i.e. errors in red), how does one set that up? I've copied the helpful solution from this question, but I'm not sure how to integrate it into Django/Google App Engine. I figured one would put the follow...

log file is not getting created using JDK logging with Commons-logging

When I run the TestJcLLoggingService class log messages are coming to Console but no log file is created, please help me if you know the answer. two source files are pasted below. TestJcLLoggingService.java package com.amadeus.psp.pasd.logging; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; impo...

How to make Tomcat 6.0 log the console?

How can I configure Tomcat 6.0 (running under Centos 5.3) to log what comes out of my web app's console (System.out/err)? Is it possible to specify a path and file size limit as well? Thanks for your help! ...

Console in Mac OpenGL application

Hi, i need a simple logging solution while writing Cocoa/OpenGL application in C++. I'd like: cout << "debug line" << endl; to open a console window and show the text. Is it possible? I'm using XCode, maybe it has some logging utility in debug mode? Thanks in advance, Etam. ...

JETTY 7.0.0.pre5 missing method LogFactory.setLogImplClassName

I'm trying to start JETTY from a shell script (previously we used Maven), and I'm coying over some dependent libraries into the JETTY_HOME/lib directory which appears to be causing Classpath conflicts, I'm trying to sort out where the proper LogFacotry.class exists, here's the exception I'm getting on startup. 2009-08-17 22:00:40.661::W...

Exception.Data info is missing in EntLib log

How do I get the Exception Handling Application Block (EHAB) to write the values from the Exception.Data property in the log? try { // ... } catch (Exception ex) { ex.Data.Add("Hello", "World"); throw ex; } The exception is logged correctly, but I can’t find the added data anywhere in the log entry created by ...

java logging vs Log4j in Spring framework. Which one is the most suitable.

Hi, We are developing a web-based application in Java using the Spring framework. We are wondering which Logging system would be the most appropriate for it, whether Log4j or JUL (java.util.Logging), which is integrated with jdk. As far as I'm concerned, the former is more popular among developers and offers higher customization option...

Logging of long/unusual page execution time automatically in ASP.NET

Hello, I'd like to implement some kind of automatic "logging" in my ASP.NET MVC application when a page execution (incl. database calls etc.) takes longer than 3 seconds, and then gather some 'circumstantial evidence', e.g. which action was called, what the parameters were, session information etc. so I can then store that info for revi...

Abstracting .NET logging with Common Infrastructure Libraries:

Hi, I've recently been considering abstracting my logging across the application. A more specific post on another resource led to the recommendation of the "Common Infrastructure Libraries": http://netcommon.sourceforge.net/ Specifically, the Common.Logging class, which provides a common interface which can sit in front of a number o...

What is the best size for a log file in LOG4J?

I have an application that runs slow. This is because of a huge amount of loggings at DEBUG and INFO levels inside the code. I have made some modifications in the code and changed the log level to WARN and it works well now. But there is only one log file (currently at 1.6GB). I want to use a RollingFileAppender to have more, smaller, ...

watch / read a growing log file with ruby

I have a log file that is constantly growing, how can I watch and parse it via a ruby script. The script will parse each new line as it is written to the file and output something to the screen when the new line contains the string 'ERROR' ...