Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2018
    Posts
    6

    Talking Log file comparison

    I need to be able to control the comparison of two log4j files that should be identical except for their initial timestamp and some memory reference values. An example would be

    Left file:
    2018-10-25 15:05:42,858 TRACE QuartzScheduler_Worker-1 sailpoint.api.Workflower:113 - Entering <init>(con = sailpoint.server.InternalContext@578a60ce)

    Right file:
    2018-10-25 15:45:00,272 TRACE QuartzScheduler_Worker-1 sailpoint.api.Workflower:113 - Entering <init>(con = sailpoint.server.InternalContext@53356320)

    So I need to be able to control this. These two lines should be identical, but they differ in the timestamp and the memory reference value associated with the class sailpoint.server.InternalContext

    The reference I saw for developing conversion scripts seemed to be for a specific type of file with a custom script which I don't want to hack. Is there a reference where I can just get a do this do that in order to write a conversion script? I will probably just write a C program to do this. I would love to be able to actually send the log4j ConversionPattern and have some arguments to pull or not pull the data.

    My ConversionPattern is %d{ISO8601} %5p %t %c{4}:%L - %m%n

    Has anyone done this, or can I just do this with grammar?

    Keith Smith
    Last edited by jetdoc57; 25-Oct-2018 at 04:02 PM. Reason: word error

  2. #2
    Join Date
    Oct 2007
    Location
    Madison, WI
    Posts
    11,949

    Default

    Hello,

    If you define a grammar to match on these text patterns, and make it a global default for the program, script will use this. Custom scripts are only used when the definitions are generated on the fly and need to be passed to each automation call. If a default can cover each case, then that default can be set once and used each time.

    We have a guide for defining it in the graphical interface here:
    http://www.scootersoftware.com/suppo..._unimportantv3

    Once defined here, it can be set as a global default and used in scripting. Would a simple pattern match work, such as a Delimited element:
    @ to \)$
    Regular Expression Enabled

    or Basic element:
    ^\d{4}\-\d{2}\-\d{2} \d{2}\:\d{2}\:\d{2}\,\d+
    with Regular Expression Enabled
    Aaron P Scooter Software

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •