Defining Timestamp parser

Here developers can talk about how to write a Parser for LogMX

Moderator: admin

Posts: 2
Joined: Thu Aug 13, 2015 8:24 pm

Defining Timestamp parser

Postby column » Mon Mar 21, 2016 11:43 am


I have simple log:

2016.03.21 10:52:10.966 1 INFO: -------------------- version --------------------
2016.03.21 10:52:10.971 1 AsyncPosJeasi.XmlFile.getElementValue CONFIG: LogLevel=FINER
2016.03.21 10:52:10.974 1 AsyncPosJeasi.XmlFile.getElementValue CONFIG: DelLogDaysOld=100

Trying to import in LogMX using Simple parser. First field I define is Timestamp.

But when I tried to write Timestamp format Parsed entries becomes empty.

What is wrong with my format?

Site Admin
Posts: 417
Joined: Sun Dec 17, 2006 10:30 pm

Re: Defining Timestamp parser

Postby admin » Mon Mar 21, 2016 12:13 pm


Actually, your Timestamp format is good. LogMX did not manage to parse your logs because it doesn't match the log line pattern you specified: you told LogMX that a log line is only composed with a Timestamp. So if you finish the log line pattern, it works:

If you prefer, you can also use a Log4j/Logback pattern (more powerful), with the pattern %d{yyyy.MM.dd HH:mm:ss.SSS} %mx{foo} %c %p: %m


Return to “Writing a Parser”

Who is online

Users browsing this forum: No registered users and 1 guest