Giter Club home page Giter Club logo

bulog's Introduction

Bulog - Web UI for application logs

Stream application logs into a central web-based UI.

Features

  • Send application logs to a web UI. Logs from different applications can be sent to different buckets for better organization in the UI.
  • View individual logs with a JSON viewer.
  • Search and filter logs with liqe, a lucene-like query language.
  • Add columns and configure them with a flexible JavaScript formatter.
  • Combine data from multiple buckets into filtered views.
  • Configurable from command line and from the web UI.
  • Import and export settings.

Installation

$ npm install -g bulog

Quick start

First start the Bulog server

$ bulog start
Bulog is running at http://localhost:3100

The web UI can now be accessed at http://localhost:3100.

The following command will forward output from tail to the server

$ tail -f logs.txt | bulog fw my-logs

These logs can immediately be seen in the web UI's my-logs bucket.

Usage

Start a Bulog instance

$ bulog start
USAGE
  $ bulog start [-p <value>] [-h <value>] [-i <value>] [-m <value>] [--tempConfig]

FLAGS
  -h, --host=<host>         Server hostname to bind or connect to
  -i, --instance=<name>     [default: default] Server instance name to use. Instances have separate configurations.
  -m, --memorySize=<value>  Number of logs to keep in memory. Logs in memory are sent to clients when they connect.
  -p, --port=<port>         Server port to bind to
      --tempConfig          Use a temporary configuration that doesn't persist after the server is closed

DESCRIPTION
  Starts the Bulog server

EXAMPLES
  Start an instance
    $ bulog start

  Start an instance on port 3000
    $ bulog start -p 3000

  Start an instance with the name "my-instance" on port 7000
    $ bulog start -p 7000 -i my-instance

Forward logs from stdin to a Bulog instance

$ bulog forward BUCKET
or
$ bulog fw BUCKET
USAGE
  $ bulog fw BUCKET [-i <value> | -h <value> | -p <value>] [-v <value>] [-o]

ARGUMENTS
  BUCKET  Bucket name. Logs are separated by buckets in the Web UI.

FLAGS
  -h, --host=<host>       [default: 127.0.0.1] Server hostname to connect to
  -i, --instance=<id>     [default: default] Server instance to connect to
  -o, --pipeOutput        Echo logs in addition to sending them to Bulog
  -p, --port=<port>       [default: 3100] Server port to connect to
  -v, --value=<value>...  Value added to logs

DESCRIPTION
  Forwards logs from stdin to a Bulog instance

ALIASES
  $ bulog fw

EXAMPLES
  Send logs to bucket "my-app"
    $ tail -f logs.txt | bulog fw my-app

  Send logs to a Bulog instance running at 127.0.0.1:3000
    $ tail -f logs.txt | bulog fw my-app -p 3000

  Send logs to a Bulog instance running at myhost:3000
    $ tail -f logs.txt | bulog fw my-app -h myhost -p 3000

  Send logs with additional log fields
    $ tail -f logs.txt | bulog fw my-app -v name:MyApp1 group:MyApps

  Send logs to a Bulog instance with name "my-instance"
    $ tail -f logs.txt | bulog fw my-app -i my-instance

Instances

You can give an instance name when you start Bulog. Each instance name has its own persistent configuration attached to it. This can make it easier to manage cases where you have multiple sets of buckets that you want to separate.

An example would be simultaneous development of two different microservice architecture based projects. Here you might want to send logs from project A to one Bulog instance, and logs from project B to another. Named instances can support such use-cases without needing to remember port numbers.

Start a named Bulog instance

$ bulog start -i project-A -p 7455

This starts a Bulog instance with name project-A on port 7455.

Forward logs to a named instance

$ tail -f logs.txt | bulog fw my-bucket -i project-A

This forwards logs to a Bulog instance with the name project-A. Note that you didn't need to provide a port number.

Default instance

If you start a Bulog instance without specifying an instance name, it will implicitly get the name default. Similarly, forwarding logs without specifying an instance name or other connection details will by automatically connect to the default instance.

$ bulog start -p 3456
...
$ tail -f logs.txt | bulog fw my-bucket

Limitations

When forwarding logs based on an instance name, the target instance must be running on the same system. You will need to specify the hostname and port to forward logs to a remote instance.

bulog's People

Contributors

olavim avatar

Watchers

 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.