logging

How to extract error info from Java log files (post-logging)

I'm trying to collect some advices on error logging in java. My log file is huge and going trough it is time consuming, currently I'm grep(ing) my log looking for error(ERROR) pattern, and then looking at line which threw exception then I search/find it and check out the error. Is there some better way of reading log files more efficien...

How to make Jetty print logs

My project runs on Wicket+Spring+JPA/Hibernate. When I run it using the command: mvn jetty:run I'd like jetty to print logs I make in the code. I have for example the following DAO implemented: @Repository(value = "isinDao") public class IsinDaoJpa implements IsinDao { @PersistenceContext private EntityManager em; pr...

Use ThreadPool for applicationwide logging?

As a followup on this question discussing the use of the ThreadPool vs a dedicated thread: When would you use a dedicated thread (with lowered priority) for applicationwide logging and when would you use the ThreadPool? ...

Does having the IIS log header in the log file mean that IIS was reset during the day?

Hi Folks, When I'm viewing IIS log files I can see various times during the day where the header line is written out to the log file. The only time I've seen this is happening is when IIS resets; or starts up. For example the header line below; #Software: Microsoft Internet Information Services 6.0 #Version: 1.0 #Date: 2010-10-18 07:28:...

Custom log4net property PatternLayoutConverter (with index)

Is it possible to create a log4net custom PatternLayoutConverter that allows an "index" value to be configured? I know about the "property" conversion string that allows you to write code like this: ThreadContext.Properties["ID"] = yourID; And specify like this: %property{ID} That the value should be included in the output. What...

How can I log the time a message box appears from a 3rd party application?

Here’s the situation: We have a 3rd party application that intermittently displays an error message. Usually the error occurs when no one is in the office, so we don’t know exactly what time the message box is popping up. We are working with our vendor to determine what the issue is, and they want to know exactly when the error is occur...

Why wouldn't GAE store my logging.debug?

It seems logging.debug() doesn't appear in GAE logs, but logging.error() does. Does anyone have an idea how can I make logging.debug() appear in the GAE logs? ...

How to configure logging to syslog in python?

I can't get my head around Python's logging module. My needs are very simple: I just want to log everything to syslog. After reading documentation I came up with this simple test script: import logging import logging.handlers my_logger = logging.getLogger('MyLogger') my_logger.setLevel(logging.DEBUG) handler = logging.handlers.SysLogH...

Displaying log data in latest-first format

I like having log data in a last-first form (the same way most blogs and news sites organize their posts). The languages I'm most comfortable in are C++ and Python: is there a way to output log data either to the screen (stdout) or a file with the most recent entry always being on top? Or is there perhaps a way of modifying tail to sho...

Get Application Path of offending DLL from Exception

We currently have a simple Log class that can take in an exception. In our business logic if we happen to need a try/catch around a specific set of code, we log the exception and then rethrow it. The problem is that our Log class is in a common dll and when it writes the log I want to be able to also grab the path of the offending code...

How to use IIS 7 custom logging module and ETW tracing module

Hi, I notice that IIS 7 has a custom logging module logcust.dll. It is said this module helps load your own custom logging module. But I can't find any information about how to use it. I opened this DLL and notice that it implements IHttpModule and register to all events but does nothing in event handlers. Same question for another IIS ...

How to stop JBoss from spamming logs if an exception occurs in onMessage of a MDB?

I have a listener bean which calls on a session beans method in the MDBs onMessage method. If an exception occurs, such as IllegalStateException (which I throw) or NPE, then JBoss keeps logging the exception, and also keeps retrying to deliver the same message, again spamming the logs, then it sends the message to DLQ, and again calls on...

Maven Plugin Logger Compatibility

I am writing a Maven plugin (Mojo) that imports a Jar library used by other projects. At least one of the classes in that library use Apache Log4j for logging, but Log4j is not going to be properly configured by the logger that Maven provides to the Mojo. Is there any simple way to bridge between these? Unfortunately, org.apache.log4j.L...

Storing comments with MySQL execution

Hi guys! I have searched for the answer to this one and haven't found it. I think it's simple. We have several users on our system that are (via programmatic methodology) using the same user id to run MySQL commands. I have been tasked with storing the user environment variable when these commands are ran. I guess my question is this: c...

Quartz keeps putting its log on all my log files

Hi everyone. I have a problem. Quartz keeps putting its log on all my log files. Can I redirect Quart's log to a separate file? Here is my logback.xml: <configuration debug="false"> <appender name="hcmut.cse.virtuallab.request" class="ch.qos.logback.core.FileAppender"> <file>log/hcmut.cse.virtuallab.request.log</file> <encoder...

Full log Apache Status in Cpanel/WHM

In Cpanel WHM I found very good log with CPU usage and Request here Main >> Server Status >> Apache Status But it contains only current data (for live apache proccess). Is it possible to get this log for a whole day? ...

Jetty6 slf4j logging - how to get custom log Formatter to work?

Hi, I'm using jetty6 with SLF4J and java logging and have been trying to add a custom log Formatter, but no matter what I try I can't seem to get it to work. I have a Formatter, like this: package mycode.logging; public class DeadSimpleFormatter extends SimpleFormatter { // Nothing here at all - just an empty subclass of SimpleForma...

How to share an instance of a class with many classes ?

I have a c# web service. When I get a new request I create a logging instance. I have many other instances of other classes to process the request and I want them to log as well. What is the best way to share logging instance without passing it in constructors or properties ? ...

How to prevent logging of certain exception in rails

When there is no database connectivity to the application, I catch the ActiveRecord::RecordNotFound exception in the rescue_action_in_public method and try to render the page which doesn't have any database access. When this happens, I dont want the Mysql:Error exception to be logged, because for the whole period of DB down, this excep...

send log output to different files in grails 1.3.2

Hi, I want to have log output of my packages or classes in a specific appender. But everything is printed out to the root-logger. Here is my config: log4j = { appenders { console name:'stdout', layout:pattern(conversionPattern: '%c{2} %m%n') file name:'grailslog', file:'grails.log', threshold:org.apache.log4j.Level...