Logdy - terminal logs in web browser

Logdy is a web-based platform designed to help monitor, track, and analyze application logs in real-time locally. It is a multi-purpose DevOps tool that enhances productivity in the terminal.

Logdy improves productivity by recording the output of the processes, whether that's standard output or a file, and routes it to a web UI. The web UI is served by Logdy on a specific port and accessible on a local host. The UI is a reactive, low-latency web application that automatically generates filters and allows you to browse and search through the logs.

Key features:

  • Zero-dependency single binary
  • Embedded Web UI
  • Real-time log viewing and filtering
  • Secure local operation
  • Multiple input modes (files, stdin, sockets, REST API)
  • Custom parsers and columns with TypeScript support (code editor with types support)
  • Go library integration

Demo of the UI

Logdy developers provide demo playground of project on their site.

Logdy preview

How to install logdy

Navigate to releases GitHub page and download the latest release for your architecture.

wget https://github.com/logdyhq/logdy-core/releases/download/v0.17.1/logdy_linux_amd64;
mv logdy_linux_amd64 logdy;
chmod +x logdy;

Additionally, you can add the binary to your PATH for easier access.

Quick start

Whatever the below command will produce to the output, will be forwarded to a Web UI.

$ node index.js | logdy
INFO[2024-02...] WebUI started, visit http://localhost:8080    port=8080

The list of accepable flags and commands:

Usage:
  logdy [command] [flags]
  logdy [command]

Available Commands:
  completion  Generate the autocompletion script for the specified shell
  demo        Starts a demo mode, random logs will be produced, the [number] defines a number of messages produced per second
  follow      Follows lines added to files. Example `logdy follow foo.log /var/log/bar.log`
  forward     Forwards the STDIN to a specified port, example `tail -f file.log | logdy forward 8123`
  help        Help about any command
  socket      Sets up a port to listen on for incoming log messages. Example `logdy socket 8233`. You can setup multiple ports `logdy socket 8123 8124 8125`
  stdin       Listens to STDOUT/STDERR of a provided command. Example `logdy stdin "npm run dev"`
  utils       A set of utility commands that help working with large files

Flags:
      --api-key string                API key (send as a header Authorization)
      --append-to-file string         Path to a file where message logs will be appended, the file will be created if it doesn't exist
      --append-to-file-raw            When 'append-to-file' is set, raw lines without metadata will be saved to a file
      --bulk-window int               A time window during which log messages are gathered and send in a bulk to a client. Decreasing this window will improve the 'real-time' feeling of messages presented on the screen but could decrease UI performance (default 100)
      --config string                 Path to a file where a config (json) for the UI is located
      --disable-ansi-code-stripping   Use this flag to disable Logdy from stripping ANSI sequence codes
  -t, --fallthrough                   Will fallthrough all of the stdin received to the terminal as is (will display incoming messages)
  -h, --help                          help for logdy
      --max-message-count int         Max number of messages that will be stored in a buffer for further retrieval. On buffer overflow, oldest messages will be removed. (default 100000)
  -n, --no-analytics                  Opt-out from sending anonymous analytical data that helps improve Logdy
  -u, --no-updates                    Opt-out from checking updates on program startup
  -p, --port string                   Port on which the Web UI will be served (default "8080")
      --rotate-file-size string       If set, how big the file can grow before being rotated, used K/M/G to describe the size, example: 15M -> 15 megabytes (env: LOGDY_ROTATE_FILE_SIZE)
      --ui-ip string                  Bind Web UI server to a specific IP address (default "127.0.0.1")
      --ui-pass string                Password that will be used to authenticate in the UI
  -v, --verbose                       Verbose logs
      --version                       version for logdy

It is possible to also provide some of the options as ENV variables, read more in the docs.

Open the URL Address and start building parsers, columns and filters. There are multiple other ways you can run Logdy, check the docs.

Run logdy as docker container

Simple one-line command:

docker run -d -p 8080:8080 -p 10800:10800 rickraven/logdy:0.17.1

Then you can visit http://localhost:8080/ in your browser. By default logdy in this image works in socket mode so you mas send logs for 10800 port. Example of simple fluent-bit log pipeline with output to logdy:

pipeline:
  inputs:
    - name: kubernetes_events
      tag: k8s_events
      kube_url: https://kubernetes.default.svc
      tls.verify: on
  outputs:
    # Just send logs to logdy socket
    - name: tcp
      match: 'k8s_events'
      tls: off
      host: 127.0.0.1
      port: 10800
      format: json_lines

You may run container for log files following:

docker run -d -p 8080:8080 -v /var/logs:/data -e LOGDY_MODE="follow" -e LOGDY_FOLLOW_FILES="/data/*.log" rickraven/logdy:0.16.0

Example docker-compose.yml for logdy:

version: '3.1'

services:
  logdy:
    image: rickraven/logdy:0.16.0
    restart: always
    ports:
      - 8080:8080
      - 10800:10800
      - 10900:10900
      - 11000:11000
    environment:
      LOGDY_PASS: "mypassword"
      LOGDY_MODE: "socket"
      LOGDY_SOCKET_PORTS: "10800 10900 11000"

Container may be configured with following environment variables:

  • LOGDY_PORT - Port on which the Web UI will be served (default: 8080).
  • LOGDY_PASS - Password for logdy Web interface.
  • LOGDY_MAX_MESSAGE - Determines the maximum number of messages that will reside in the buffer. Buffer is an ordered FIFO queue with a fixed size (default: 1000).
  • LOGDY_API_KEY - API key to be used when communicating with Logdy through the API. If not set, it will be automatically generated and output to the startup log.
  • LOGDY_MODE - Image may be work in follow and socket modes (default: socket).
  • LOGDY_FOLLOW_FILES - Space separated list of files for following. Working only in follow mode.
  • LOGDY_SOCKET_PORTS - Space separated list of ports which listens by logdy. Working only in socket mode.

Documentation

For product documentation navigate to the official docs.

Source code of the project available on GitHub.