Giter Club home page Giter Club logo

Comments (5)

couchcoding avatar couchcoding commented on May 20, 2024 1

Based on your example log entries, i created a working columnizer.

2019-12-10_06-37-12

Paste the following XML fragment into the columnizer.xml file and rename "issue_15" into something more meaningful:

<Columnizer Name="Issue_15" DateTimeFormat="MM-dd-yy hh:mm:ss.fff">
  <LogColumns>
    <LogColumn Name="Timestamp" Expression="^([0-1][0-9]/[0-3][0-9]/[0-9][0-9] [0-9][0-9]:[0-5][0-9]:[0-5][0-9].[0-9][0-9][0-9]),.*" Optional="False" Type="1" />
    <LogColumn Name="Unknown 1" Expression="^[0-1][0-9]/[0-3][0-9]/[0-9][0-9] [0-9][0-9]:[0-5][0-9]:[0-5][0-9].[0-9][0-9][0-9],[\s]*([0-9])[\s]*,.*" Optional="False" Type="0" />
    <LogColumn Name="Unknown 2" Expression="^[0-1][0-9]/[0-3][0-9]/[0-9][0-9] [0-9][0-9]:[0-5][0-9]:[0-5][0-9].[0-9][0-9][0-9],[\s]*[0-9][\s]*,[\s]*([0-9])[\s]*,.*" Optional="False" Type="0" />
    <LogColumn Name="Sender" Expression="^[0-1][0-9]/[0-3][0-9]/[0-9][0-9] [0-9][0-9]:[0-5][0-9]:[0-5][0-9].[0-9][0-9][0-9],[\s]*[0-9][\s]*,[\s]*[0-9][\s]*,([0-9A-Za-z]+),.*" Optional="False" Type="0" />
    <LogColumn Name="Level" Expression="^[0-1][0-9]/[0-3][0-9]/[0-9][0-9] [0-9][0-9]:[0-5][0-9]:[0-5][0-9].[0-9][0-9][0-9],[\s]*[0-9][\s]*,[\s]*[0-9][\s]*,[0-9A-Za-z]+,[\s]*([0-9])[\s]*,.*" Optional="False" Type="2" />
    <LogColumn Name="Message" Expression="^[0-1][0-9]/[0-3][0-9]/[0-9][0-9] [0-9][0-9]:[0-5][0-9]:[0-5][0-9].[0-9][0-9][0-9],[\s]*[0-9][\s]*,[\s]*[0-9][\s]*,[0-9A-Za-z]+,[\s]*[0-9][\s]*,((.|\n)*),.*" Optional="False" Type="3" />
  </LogColumns>
  <LogLevels>
    <LogLevel Value="0" Level="1" />
    <LogLevel Value="1" Level="2" />
    <LogLevel Value="2" Level="4" />
    <LogLevel Value="3" Level="8" />
    <LogLevel Value="4" Level="16" />
    <LogLevel Value="5" Level="32" />
  </LogLevels>
</Columnizer>

from logbert.

leeand00 avatar leeand00 commented on May 20, 2024

Here is the regex I am using for that: ^([0-1][0-9])/([0-3][0-9])/([0-9][0-9]) ([0-9][0-9]):([0-5][0-9]):([0-5][0-9]).([0-9][0-9][0-9])

from logbert.

couchcoding avatar couchcoding commented on May 20, 2024

Do you have an example log file (or a few lines of log) for me?

from logbert.

leeand00 avatar leeand00 commented on May 20, 2024

Well here's one:

12/05/19 08:27:49.938, 0, 0,LoadHandlers,        3,Effectivity job ran in 17.015 ms for COMBO_GROUP_DETAIL_PRICE,

They all begin with that prefix.

Strangely, some of these also have additionally lines after a log entry (another words, instead of just a single log line, they will be a line similar to what I posted above) followed by a line break CRLF and and then it'll just do a free for all for instance:

12/05/19 08:27:49.938, 0, 0,LoadHandlers,        3,12-05 08:27:49

Job                    Process MS  Upd db MS  Get ChgSets MS  Total #  Updated #  Sql Run
---------------------  ----------  ---------  --------------  -------  ---------  -------
MiPrice                         0          0               0        0          0        0
Tax                             0          0               0        0          0        0
Discount                        0          0               0        0          0        0
PageCA                          0          0               0        0          0        0
TenderMedia                     0          0               0        0          0        0
ServiceCharge                   0          0               0        0          0        0
ComboGroupDetailPrice          15          0               0        0          0        0

TOTALS                         15          0               0        0          0        0

Total ms: 15

,
12/05/19 08:27:47.310, 0, 0,LoadHandlers,        5,OPS Requesting database updates,

Not sure if that could be screwing it up.

from logbert.

leeand00 avatar leeand00 commented on May 20, 2024

Thank you! I was not aware that LogBert could match like that using \n I will take a look into this and let you know what happens. Good to know also that the Columnizers are configurable in XML as well.

from logbert.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.