Coder Social home page Coder Social logo

rustlog's Introduction

Rustlog

Description

Rustlog is a Twitch logging service based on justlog. It provides the same web UI and API, but it utilizes Clickhouse for storage instead of text files.

Installation

Create a config.json file (see CONFIG.md)

Docker

version: "3.8"
  
services:
  clickhouse:
    image: clickhouse/clickhouse-server:latest
    container_name: clickhouse
    volumes:
      - "./ch-data:/var/lib/clickhouse:rw"
    environment:
      CLICKHOUSE_DB: "rustlog"
    restart: unless-stopped
        
  rustlog:
    image: ghcr.io/boring-nick/rustlog:master
    container_name: rustlog
    ports:
      - 8025:8025 
    volumes:
      - "./config.json:/config.json"
    depends_on: 
      - clickhouse
    restart: unless-stopped

From source

  • Follow the Contributing excluding the last step
  • cargo build --release
  • The resulting binary will be at target/release/rustlog

Advantages over justlog

  • Significantly better storage efficiency (3x+ improvement) thanks to not duplicating log files, more efficient structure and better compression (using ZSTD in Clickhouse)
  • Blazing fast log queries with response streaming and a highly performant IRC parser
  • Support for ndjson logs responses

Contributing

Requirements:

  • rust
  • yarn
  • docker with docker-compose (optional, will need to set up Clickhouse manually without it)

Steps:

  1. Clone the repository (make sure to include submodules!):
git clone --recursive https://github.com/boring-nick/rustlog

If you already cloned the repo without --recursive, you can initialize submodules with:

git submodule update --init --recursive
  1. Set up the database (Clickhouse):

This repository provides a docker-compose to quickly set up Clickhouse. You can use it with:

docker-compose -f docker-compose.dev.yml up -d

Alternatively, you can install Clickhouse manually using the official guide.

  1. Create a config file

Copy config.dist.json to config.json and configure your database and twitch credentials. If you installed Clickhouse with Docker, the default database configuration works.

  1. Build the frontend:
cd web
yarn install
yarn build
cd ..
  1. Build and run rustlog:
cargo run

You can now access rustlog at http://localhost:8025.

Migrating from justlog

See MIGRATION.md

rustlog's People

Contributors

boring-nick avatar 0supa avatar bisspector 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.