Log4j date pattern parsing problem

Notes, tips, and other usefull things on how to use LogMX

Moderator: admin

Post Reply
isheedm
Posts: 109
Joined: Wed Sep 12, 2007 2:16 pm

Log4j date pattern parsing problem

Post by isheedm »

I tried using the following Log4J pattern for my log files (used successfully with Chainsaw):

%p %d{ISO8601} [%t] (%F:%L) %c - %m%n

The level gets incorrectly parsed with the date.

For example, this log message:

INFO 2007-08-31 15:29:28,940 [main] (Example.java:290) com.server.host - Hello World

is parsed with a Level = "INFO 2007-08-31"

With chainsaw, I have to set this date format parameter:

<param name="timestampFormat" value="yyyy-MM-dd HH:mm:ss,SSS"/>

Can this be fixed?
admin
Site Admin
Posts: 555
Joined: Sun Dec 17, 2006 10:30 pm

Post by admin »

Hello,

You're right, it's a known bug in v1.0.7 that will be fixed in the next release v1.1.0, which is a major release including many bugfixes and new features that will be available within a month. Log4j Pattern parsers will be greatly improved in this release (user will be able to set many different parser settings, and parsing performance will be improved).

Sorry for the inconvenience. For now, you can use JavaClass parsers to parse your file (cf. sample parser in LogMX and http://www.logmx.com/p_parser_dev.php).

Feel free to contact us if you need help to use JavaClass parsers.

Xavier.
admin
Site Admin
Posts: 555
Joined: Sun Dec 17, 2006 10:30 pm

Post by admin »

Hello,

This bug is now fixed in the new 1.1.0 release. Log4j pattern parsing has been greatly improved (performance and new features).

Note that LogMX now requires Java 5 or later (versions 1.4 not supported anymore).

Xavier
Post Reply