go-log

module
v0.0.0-...-6b08371 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: MIT

README

go-log

This public go package configures log/slog stdlib for json formatted logs suitable for sending to Datadog.

APM trace_id is added from request context if available.

example usage:

import (
    "log/slog"
    "github.com/mediafly/go-log/log"
)

func init() {
    log.SetupLog(slog.LevelInfo)
    slog.Info(fmt.Sprintf("origin: %v", origin))
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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