Trying parsing WLS Logs

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

Moderator: admin

leoromerbric
Posts: 1
Joined: Mon Oct 17, 2016 3:29 pm

Trying parsing WLS Logs

Postby leoromerbric » Mon Oct 17, 2016 4:52 pm

Hello,

I'm new using LogMX and I'm trying to parse

I'm trying to define a custom logback parser using pattern based on Oracle Diagnostic Logs.
But LogMX can't parse any line.?

The pattern

Code: Select all

[timestamp] [component id] [messagetype:level] [message-id] [module id] ([field-name: field-value])* message-text [supplemental-detail]


This is the input

Code: Select all


[2016-10-17T11:42:06.982-03:00] [DefaultServer] [TRACE] [] [oracle.osb.debug.sources] [tid: [ACTIVE].ExecuteThread: '15' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: 930fc4e6-d11c-4d29-8575-c73032260818-000008c7,0] [APP: Service Bus Transform] [FlowId: 0000LVJ5upkCom_JTQZBF81Nzxc200000c] [SRC_CLASS: com.bea.wli.sb.sources.MetaTransformerImpl] [SRC_METHOD: debug] +MetaTransformerImpl.transform(com.bea.wli.sb.sources.XmlObjectSource,com.bea.wli.sb.sources.XmlObjectSource)
[2016-10-17T11:42:06.983-03:00] [DefaultServer] [TRACE] [] [oracle.osb.debug.sources] [tid: [ACTIVE].ExecuteThread: '15' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: 930fc4e6-d11c-4d29-8575-c73032260818-000008c7,0] [APP: Service Bus Transform] [FlowId: 0000LVJ5upkCom_JTQZBF81Nzxc200000c] [SRC_CLASS: com.bea.wli.sb.sources.MetaTransformerImpl] [SRC_METHOD: debug] -MetaTransformerImpl.transform()
[2016-10-17T11:42:06.983-03:00] [DefaultServer] [NOTIFICATION] [OSB-382176] [oracle.osb.pipeline.kernel.router] [tid: [ACTIVE].ExecuteThread: '15' for queue: 'weblogic.kernel.Default (self-tuning)'] [userId: <anonymous>] [ecid: 930fc4e6-d11c-4d29-8575-c73032260818-000008c7,0] [APP: Service Bus Transform] [FlowId: 0000LVJ5upkCom_JTQZBF81Nzxc200000c] [[
 [Rastreo de OSB] Contexto de mensaje de respuesta:
$body = <Body xmlns="http://schemas.xmlsoap.org/soap/envelope/">
  <OutputParameters xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/sp/BSS.000011_1.0.SP_WS_INHABILIDADES" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <PRESULTADO>1</PRESULTADO>
  </OutputParameters>
</Body>
$header = <soapenv:Header xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"/>

]]


Could you help me to define the pattern?

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

Re: Trying parsing WLS Logs

Postby admin » Tue Oct 18, 2016 2:48 am

Hello,

The following pattern works, but all the field-name/field-values pairs are included in the message:

Code: Select all

[%d{yyyy-MM-dd'T'HH:mm:ss.SSSXXX}] [%mx{Component id}] [%level] [%mx{Msg id}] [%c] %msg%n


If you want to parse any non-fixed number of fields (like ([field-name: field-value])* suggests) into dedicated columns/fields, then you will need to use a LogMX Java Class Parser instead of a Log4j/Logback Parser (see http://www.logmx.com/parser-dev). If you need help to set it up, please let me know.

Xavier


Return to “Writing a Parser”

Who is online

Users browsing this forum: No registered users and 1 guest