# README
Stroom Log™
Simple logger inspired by bwmarrin/lit with fields, opentracing and json output support.
Design Philosophy
The design of the API is inspired by Grafana's Loki log aggregation system and structured logging practices. As a result, it heavily favours using fields to log variable data and having log messages be the same regardless of the contextual data.
Example:
log.WithFields(log.Fields{
"userId": user.id,
"requestId": requestId,
}).Info("user logged in successfully")
instead of
log.Info("request %s user %d logged in successfully", user.id, requestId)
Usage
Fetch the package:
go get github.com/Strum355/log
and import it:
import (
"github.com/Strum355/log"
)
initialize the logger for development:
log.InitSimpleLogger(&log.Config{...})
or for production using a JSON log parser like FluentD
log.InitJSONlogger(&log.Config{...})
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Constants
Error Levels that can be used to differentiate logged messages and also set the verbosity of logs to display.
Error Levels that can be used to differentiate logged messages and also set the verbosity of logs to display.
Error Levels that can be used to differentiate logged messages and also set the verbosity of logs to display.
Error Levels that can be used to differentiate logged messages and also set the verbosity of logs to display.
# Variables
No description provided by the author