Defining Timestamp parser

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

Moderator: admin

Post Reply
column
Posts: 5
Joined: Thu Aug 13, 2015 8:24 pm

Defining Timestamp parser

Post by column »

Hello,

I have simple log:

2016.03.21 10:52:10.966 1 AsyncPosJeasi.Cfg.read INFO: -------------------- version 2.3.73.19 --------------------
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.
Image

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

What is wrong with my format?
admin
Site Admin
Posts: 555
Joined: Sun Dec 17, 2006 10:30 pm

Re: Defining Timestamp parser

Post by admin »

Hello,

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:
Image

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
Image

Xavier
Post Reply