Git Product home page Git Product logo

grap's Introduction

GRAP

Utility that GReps for gAPs and out of sequence line in log files

Installing

npm install grap -g

Usage

For example, given the logs file in test/sample.log:

Dec 08 03:00:14.035 DEBUG  Something interesting happened
Dec 08 03:00:14.036 DEBUG  Something interesting happened
Dec 08 03:00:14.037 DEBUG  Something interesting happened
Dec 08 03:00:14.025 DEBUG  Something interesting happened
Dec 08 02:00:14.038 DEBUG  Something interesting happened
Dec 08 03:00:16.035 DEBUG  Something interesting happened
Dec 08 03:00:15.035 DEBUG  Something interesting happened

Anything look out of place to you? Probably not. humans are not very good at performing repetitive tasks. Let's run grap to see what it finds:

# grap test/sample.log
Dec 08 03:00:14.025 DEBUG  Something interesting happened
Dec 08 02:00:14.038 DEBUG  Something interesting happened
Dec 08 03:00:15.035 DEBUG  Something interesting happened

Hmm. It seems that 3 log lines are out of sequence. The first one is a few milliseconds back in time, the second about an hour and the third a fujll second before the previous line.

You can also pipe text to grap and it will work in the same way:

# cat test/sample.log | grap
Dec 08 03:00:14.025 DEBUG  Something interesting happened
Dec 08 02:00:14.038 DEBUG  Something interesting happened
Dec 08 03:00:15.035 DEBUG  Something interesting happened

Options

grap's People

Contributors

loopingrage avatar

Watchers

 avatar  avatar

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.