Column split pattern: nested characters problem [SOLVED]

rombert
Posts: 6
Joined: 29 Sep 2012, 12:04

Column split pattern: nested characters problem [SOLVED]

Postby rombert » 26 Oct 2012, 15:04

Hi,

I have a column definition based on a pattern:

Code: Select all

TIMESTAMP *LEVEL* [THREAD] LOGGER MESSAGE
, which works fine most of the time. However, for some log entries the THREAD value contains another pair of square brackets, e.g.

Code: Select all

26.10.2012 14:51:38.078 *WARN* [127.0.0.1 [1351252298019] GET /bla/bla.json HTTP/1.1] org.apache.jackrabbit.core.security.user.UserManagerImpl Invalid value 0 for groupMembershipSplitSize. Expected integer >= 4
.

This make retrospective match 127.0.0.1 [1351252298019 as the thread name, when I would expect it to match [127.0.0.1 [1351252298019] GET /bla/bla.json HTTP/1.1] .

Thanks,

Robert
Lukasz
centeractive people
Posts: 12
Joined: 12 Sep 2012, 10:35

Re: Column definition pattern: nested characters problem

Postby Lukasz » 28 Oct 2012, 19:38

Hi Robert,

I know that people often have problem with the column split definition. You have to know that improvement in this area is on top of our priority list.
On the other hand, different logging framework give developers lots of freedom to define the structure of a log entry I’m afraid that we’ll not be able to cover 100% cases people may have.

Getting back to your case. I think that your definition is too simple in order to split it correctly.

Maybe try with the following one:
TIMESTAMP *LEVEL* [CLIENT_IP_ADDRESS [THREAD] HTTP_METHOD HTTP_RESOURCE HTTP_PROTOCOL] LOGGER MESSAGE

With such definition you’ll have your thread ID in a separate column and the logger will be recognized correctly. The disadvantage is that it will produce more columns that you may not want to see. Luckily you can disable them by right clicking on the column header in the search result table.

Thanks,
Lukasz
rombert
Posts: 6
Joined: 29 Sep 2012, 12:04

Re: Column definition pattern: nested characters problem

Postby rombert » 29 Oct 2012, 10:05

Hi Lukasz,

Thanks for your reply ; with the definition of

TIMESTAMP *LEVEL* [CLIENT_IP_ADDRESS [THREAD] HTTP_METHOD HTTP_RESOURCE HTTP_PROTOCOL] LOGGER MESSAGE

I get an error message: Constructed definition is invalid.

Robert
Lukasz
centeractive people
Posts: 12
Joined: 12 Sep 2012, 10:35

Re: Column definition pattern: nested characters problem

Postby Lukasz » 05 Nov 2012, 11:18

Hi Robert,

I tried this pattern

Code: Select all

TIMESTAMP *LEVEL* [CLIENT_IP_ADDRESS [THREAD] HTTP_METHOD HTTP_RESOURCE HTTP_PROTOCOL] LOGGER MESSAGE

on two different OS and it worked for me. The reason could be also that your log file contains some non printable characters which are removed when pasting sample to the forum.

Would you be so kind and send us a sample (3-5 lines) of your log file to our support email? If possible please also attach the retrospective log file.

Cheers,
Lukasz
rombert
Posts: 6
Joined: 29 Sep 2012, 12:04

Re: Column definition pattern: nested characters problem

Postby rombert » 23 Nov 2012, 13:25

I've went through the the steps again with 2.1.3 and it seems to work just fine. Thanks!
tom.bujok
centeractive people
Posts: 19
Joined: 16 Aug 2012, 15:26

Re: Column definition pattern: nested characters problem

Postby tom.bujok » 26 Nov 2012, 10:28

Cool! We worked really hard to make it working. Enjoy!

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 1 guest