GithubHelp home page GithubHelp logo

doytsujin / wonlog Goto Github PK

View Code? Open in Web Editor NEW

This project forked from devrama/wonlog

0.0 1.0 0.0 4.25 MB

Simple analytic tool that streams local logs to web browser.

Dockerfile 0.32% JavaScript 2.42% TypeScript 93.86% HTML 2.45% CSS 0.88% Shell 0.07%

wonlog's Introduction

wonlog

Stream your local logs to browsers.

This project is inspired by rtail.

Features

  • stream raw text or JSON string logs to browser
  • search logs by a keyword
  • multiple log streams to a browser
  • sort logs
  • uses UDP & WebSocket

Screenshots

Screenshot - darkmode Screenshot - lightmode Screenshot - search & settings Screenshot - detail view

Installing

Using npm:

$ npm install -g wonlog

Using yarn:

$ yarn global add wonlog

How to use

First, run a wonlog server

$ wonlog-server

Second, open your browser with http://localhost:7979

Third, pipe your log to wonlog agents

# streaming output of you node server logs to wonlog agent
$ node your_express_server.js | wonlog-agent --stream-name='My First Log stream' --verbose

# openning a log file to wonlog agent
$ cat log_file.txt | wonlog-agent --stream-name='My First Log stream' --verbose

# streaming from a growing log file to wonlog agent
$ tail -F log_file.txt | wonlog-agent --stream-name='My First Log stream' --verbose

# streaming from JSON to wonlog agent
$ echo '{ "foo": "bar" }' | wonlog-agent --stream-name='My First Log stream' --verbose
$ echo "{ foo: 'JSON5' }" | wonlog-agent --stream-name='My First Log stream' --verbose

JSON log format

Reserved Properties

  • timestamp: If timestamp property exists in a JSON formt log with either ISO Date string or the number of milliseconds elapsed since Janunary 1, 1970, TIMESTAMP column on wonlog screen shows it instead of the timestamp of current time.
  • message: If message property exists in a JSON format log, MESSAGE column shows it instead of stringified log.
  • level: If level property exists with values below in a JSON format log, TIMESTAMP column shows in different colors.
    • critical or fatal
    • error
    • warn or warning
    • info
    • debug
    • trace

CLI options

wonlog-server

$ wonlog-server --help
Usage: index [options]

Options:
  --webapp-host [host]  WebApp Server host (default: "0.0.0.0")
  --webapp-port [port]  WebApp Server port (default: "7979")
  --http-host [host]    HTTP Server host (default: "0.0.0.0")
  --http-port [port]    HTTP Server port (default: "7978")
  --udp-host [host]     UDP Server host (default: "0.0.0.0")
  --udp-port [port]     UDP Server port (default: "7977")
  -h, --help            display help for command

wonlog-agent

$ wonlog-agent --help
Usage: agent [options]

Options:
  -h, --udp-host [host]     UDP Server host (default: "127.0.0.1")
  -p, --udp-port [port]     UDP Server port (default: "7977")
  -s, --stream-name [name]  Stream name
  -v, --verbose [type]      Print logs (default: false)
  --help                    display help for command

Running wonlog-server with Docker

$ docker pull calmgracian/wonlog:latest
$ docker run --name wonlog-server -d -p 7979:7979 -p 7978:7978 -p 7977:7977/udp calmgracian/wonlog:latest

wonlog's People

Contributors

devrama avatar dependabot-preview[bot] 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.