Giter VIP home page Giter VIP logo

logy's Introduction

Logy

The best parser for filtering and handling files of any size with ease. Inspecting or filtering large files can be a real pain. Logy let's you open any file in a paginated manner so that there is no overhead of opening the whole file when all you want is searching for a small chunk of text. Besides file paths, it also supports folder paths.

Features

  • Written in pure Go (Golang)
  • Requires Go >= 1.11 to build. Just visit this link on how to install Go on your machine
  • Simple installation process
  • Very easy to use and highly intuitive
  • Works on Mac, Linux and Windows

Installation

There is no need to install anything. If you want to skip the setup process and just use the tool, follow this link and use the build that is specific to your OS (Mac, Linux or Windows). All binaries were built against 64bit architectures.

Otherwise clone the repository. This way you can contribute to the project :)

Usage

After the file is parsed you can navigate to any page by specifying the desired page number

Basic usage

$ logy path/to/file.log # By default it outputs 50 lines per page
$ logy path/to/folder --ext=log,txt # The extensions (-ext) flag must be specified for folder paths to mention what file types should be scanned. In this example the parser will search the folder recursively for all files ending with .log or .txt extension

Specify how many lines per page

$ logy path/to/file.log --lines=25 # Now it will output 25 lines per page
$ logy path/to/folder --ext=log,txt --lines=25 # Now it will output 25 lines per page

Format json output

$ logy path/to/file.log --text=json # Every json structure that is found will be nicely formatted 
$ logy path/to/folder --ext=log,txt --text=json # Every json structure that is found will be nicely formatted 

Search for text

$ logy path/to/file.log --filter=Exception # Every text that is found will be nicely colored to be easily observed 
$ logy path/to/folder --ext=log,txt --filter=Exception # Every text that is found will be nicely colored to be easily observed 

Navigate to any page

$ logy path/to/file.log --page=10 # The parser will directly navigate to the specified page number 
$ logy path/to/folder --ext=log,txt --page=10 # The parser will directly navigate to the specified page number 

Enable regex support

$ logy path/to/file.log --filter=[0-9]{2}:[0-9]{2}:[0-9]{2} --with-regex # The parser will search for any text that matches whatever was specified in the filter option flag
$ logy path/to/folder --ext=log,txt --filter=[0-9]{2}:[0-9]{2}:[0-9]{2} --with-regex # The parser will search for any text that matches whatever was specified in the filter option flag

Disable colored output of any kind

$ logy path/to/file.log --no-color # The parser will display all text with the same color (black/white). Probably you will never want this behavior but it's here just in case :)
$ logy path/to/folder --ext=log,txt --no-color # The parser will display all text with the same color (black/white). Probably you will never want this behavior but it's here just in case :)

Of course all the flag options can be combined in any manner to obtain the desired results

Note

Because regex implementation in Go is not highly performant, use the --with-regex flag when it is absolutely necessary, especially with large files.

Contributing

Bug Reports & Feature Requests

Please use the issue tracker to report any bugs or feature requests.

License

The Logy CLI tool is open-sourced software licensed under the MIT license.

logy's People

Contributors

iulianclita 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.