mend-log-parser

command module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 6, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

README

Logo

License

Mend Log Parser

A utility written in Golang for quick identification and resolution of issues in Mend log files.

Supported Operating Systems
  • Windows: 10, 2012, 2016
  • Linux: Ubuntu 22.04
Prerequisites
  • The built binary for mend-log-parser.
  • A log file for analysis.
Evolution of the tool

The Mend Log Parser is considered a living tool, in the fact that the base code defines a simple way of analyzing log files, while Mend and the end user can specify search terms for log files that are being analyzed. These search terms are called "Search Filters" The strings are supplied in the mend-settings.config file and are evaluated in one of two ways:

  1. Contains - In this method, a normal string is supplied, and then the log parser searches for this string specifically within the log file.
  2. Regex - With this search method, users can specify regex: at the beginning of a string, and then everything after that is the regex that needs to be matched.

Arguments

The following are possible command-line arguments when running mend-log-parser

Flag (shorthand / original) Type Required Default Description
-f, --file string True N/A The path to the log file that needs analyzed.
--filter string False N/A The search string you would like to search for. To use a regex, start with "regex:". If set, then it ignores filters provided in the configuration file.
-c, --config string False This Link Config file location. If this is a URL, it must return the configuration file in plaintext.
-lba, --lines-before-after integer False 3 Number of lines to display before and after the message evaluated from a search term.
-lb, --lines-before integer False 3 Number of lines to display before the message evaluated from a search term.
-la, --lines-after integer False 3 Number of lines to display after the message evaluated from a search term.
-nc, --no-color flag False False When set, directs the output to not use color.

Search Filters

Search Filters are definitions provided in one of the .csv files above that tells Mend-LogParser how to behave when resolving each match requirement. The following columns are:

  1. Search Filter String - Required - The full search terms of the Match Requirement. Start with regex: to denote a Regular Expression.
  2. Documentation URL - Not Required - The Documentation URL where you can read more about an issue and how to fix it. This can also contain a simple message

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
bll module
models module
utils module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL