logging

Glassfishv3 and log4j

Hi... I´m using glassfishv3 for few days. But i don´t know how to get log4j working with the v3. In glassfishv2 there was a "System Classpath" field which you could used in order to point to your log4j.properties file. But in glassfishv3 "System Classpath" is not supported any more. So where i have to put the log4j.properties file on...

ASP.NET: How can I use a listener defined on Web.Config?

Hello. I'm developing an ASP.NET WebForm application with Visual Studio 2008 SP1 and C#. I've defined the following listener on Web.Config: <system.diagnostics> <trace> <listeners> <add name="myListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="D:\Logs\logWeb.txt" /> </listeners...

log4net custom log objects and appender

I'd like to extend log4net to accept custom log objects as parameter. For example: public class MyLogObject { public string PropA; public int PropB; } private MyLogObject entry = new MyLogObject() {PropA = "FooBar", PropB = 1}; Log.Debug(entry); ... this should work similar to exceptions. In t...

What log viewer tools can read the XML created by System.Diagnostics.EventSchemaTraceListener?

I am in the process of converting our logging implementation to use System.Diagnostics.TraceSource. We want to take advantage of activity tracing and we want to read multiple log files from multiple servers with tools like WCF's svctraceviewer & logparser. I have converted our code to use TraceSource and now I am in the process of eval...

Component to display log info in Delphi.

I have a number of complex processing tasks that will produce messages, warnings, and fatal errors. I want to be able to display these messages in a task-independent component. My requirements are: Different kinds of messages are displayed in different font and/or background colors. The display can be filtered to include or exclude e...

How to include the calling class and line number in the log using Pantheios?

I just started using Pantheios and it feels really like a great library for logging! Maybe even the greatest one for C++! Congratulations to the author! However, I could not find neither in the documentation nor in all the forum posts anything about how to include the calling class and the line number in the log. I'm using be.file as b...

Log runtime Exceptions in Java using log4j

Hi, I am currently building an application using Tomcat, Spring, JAVA. I am using Log4J as my logging library. I currently am logging everything to a text file. One of the issues I'm having is that RuntimeExceptions are not being logged to any files. I was wondering if there was a way to log all RuntimeExceptions that maybe thrown ...

Log4Net multiple SMTP appenders?

I have configured a SMTP appender to send an email whenever there's an error. <appender name="EmailAppender"> <bufferSize value="50" /> <lossy value="false" /> <threshold value="ALL" /> <evaluator type="log4net.Core.LevelEvaluator,log4net"> <threshold value="ERROR" /> </evaluator> </appender> I need to also get an email...

How Expensive is Thread.getStackTrace()?

In a logging system, every log output is done by a helper class with a method such as this one public void debug(String message) { Logger logger = Logger.getLogger(getCallingClass()); logger.debug(message); } ... public Class getCallingClass() { /* Calls Thread.getStackTrace() and back traces until the class on the stack trace ...

How to know/log whether Hibernate 2nd-level cache was used or not for a query?

Hi, Currently, in order to check if the Hibernate 2nd-level cache was used for a Database query, I check my SQL log (through p6spy or logSql=true in Datasource.groovy) to see if the Grais/Hibernate triggered an SQL query. And I assume that if the query was not logged, it might mean that cache was used. It is pretty complicated for a ...

log4net save buffer from BufferedAppender

Hi, we are using log4net with a AdoNetAppender to write critical logs into an database. Since the AdoNetAppender is a subclass of the BufferedAppender there is a possibility to enable queuing of log events. What I'd like to do is to save the backup & restore the log buffer to a local file, so that no log entry can get lost it the databa...

Reading log from Log4Net generated by multiple threads

I have a script that has multiple threads running in parallel. These threads write to a Log4Net RollingFileAppender file. Reading this log is a quite confusing since all the thread logs are mixed up. Im wondering what is a good way to write these logs, and what is the best way to read these files so reading the debugging information of a...

two context problem

Hi! I'm new here and hope you can help me a little. I use two contexts: <Context docBase="Base1" path="/Con1" reloadable="true"/> <Context docBase="Base1" path="/Con2" reloadable="true"/> Is it possible to start the tomcat in a way that we use just one context but we can somehow keep the other context? (maybe unvisible for the serv...

ADO: Is it possible getting the name of the stored procedure and its parameter values as a prepared unit for logging when using Ado.Command object for data manipulation?

Is it possible getting the name of the stored procedure and all its parameter values as a prepared unit for logging when using Ado.Command object for data manipulation? I have used ADO.Command object in order to perform insert, update , delete operations. Now, I want to write a log and use the name of the stored procedure and parameter ...

Logging within utility classes

I want to adopt logging within several utility classes, e. g. DBI. What is the best practice to do it with Log::Log4perl? I think it is OK to subclass DBI (say, MyDBI) and override some methods there to make them do the logging. But there's a problem with categories. If you create a logger with Log::Log4perl->get_logger(ref $self || $s...

How to turn off logging from slf4j

It's a third party application generating huge amounts of logentries on our appserver. Like this: [03.03.10 15:21:57:250 CET] 00000180 FtpProtocolHa I org.slf4j.impl.JCLLoggerAdapter info Close connection : 10.227.10.10 - admin [03.03.10 15:27:35:209 CET] 00000181 MinaFtpProtoc I org.slf4j.impl.JCLLoggerAdapter info [/10.227.10.10] CLO...

How do I output/log the sql being executed behind the scenes by the Entity Framework?

How do I output/log the sql being executed behind the scenes by the Entity Framework in an asp .net mvc application? In my case I'm using a Sql Server 2005 database. I found this question Linq to Sql logging, but I'm trying to figure out how to do this with the entity framework v1 and asp .net mvc 1.0. Any one have any ideas on how? ...

Enable debug logging in maven jetty 7 plugin

I'm running a java webapp with a simple mvn jetty:run, using the latest jetty plugin, but I can't seem to find a way to tell jetty to output DEBUG messages to console (for the embedded jetty instance, not the plugin itself). It's currently outputting only WARN and INFO messages. I've tried setting -DDEBUG and -DVERBOSE, but they don't do...

Guidelines for logging (tracing) in a Windows application

As I see it there are two different types of logging: User-focused logs, like those produced by my anti-virus ("started scan", "no threats found", etc.) Developer-focused traces, which may be as simple as a log of exceptions or as detailed as a log of every method call I'm currently planning how to incorporate the second type of logg...

How can I automatically log use of any @Deprecated annoted method in Java ?

I'm currently using slf4j on top of log4j for logging. I would like to automagically log any use of a deprecated method (annotated with the standard @Deprecated annotation) in my code. Is there any easy way to do this ? ...