minilog

command module
v0.0.0-...-3682435 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2022 License: MIT Imports: 10 Imported by: 0

README

minilog

Ingest JSON log messages into SQLite for analysis

An extremely simple alternative to Splunk, Logentries, ELK, or grepping.

Run it as: ./my_service 2>&1 | /path/to/minilog /path/to/minilog.db

Minilog will populate /path/to/minilog.db with log entries.

JSON fields recognized:

  • msg: The primary log message
  • level: The log level (trace, debug, info, warn, error)
  • time: The log timestamp (RFC3339 format)
  • context_id: A unique token usually used to group log messages (usually request_id for HTTP requests)
  • context_type: A unique string for what type of context this message came from (background_job, http_request, ...)

All other fields are inserted as rows into the Field table.

Pairs really well with https://github.com/sirupsen/logrus and https://sqliteviz.com

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL