Welcome to log-parser-cli 👋

Version License: MIT

Log parser CLI that filters all the log messages with the logLevel specified and generates an output log file in a readable format

Prerequisites

  • npm >= 7.24.0
  • node >= 16.10.0

Install

npm install

Usage

# You can use the defined script to run the log parser, this will show you a set of questions in the CLI
npm run parse-log

# You can run the CLI parser by providing the options
npm run parse-log -- --input ./app.log --output error-log.json --logLevel error

# You can also install the CLI package globally by running
npm run link-cli-locally

# Then you can start using the CLI by running the log-parser-cli command, take a look at the second picture in the example(CLI Usage)

Example

When you run parse-log with no options, it will show you a set of questions

Alt text

CLI Usage

Alt text

Help section

If you want to know the purpose of each option and what values they expect you can run the following command

npm run help

Run tests

npm run test
npm run test:integration

Author

👤 Moises Trigueros


This README was generated with ❤️ by readme-md-generator