json

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package json is a JSON log formatter.

It is a good solution for production environment where log lines are usually sent to a log aggregator, such as Elasticsearch (ELK stack), or Splunk.

Index

Constants

View Source
const Name = "json"

Variables

This section is empty.

Functions

func New

func New(c config.Tree) (log.Formatter, error)

Types

type Formatter

type Formatter struct{}

func (*Formatter) Format

func (f *Formatter) Format(
	ctx *log.Context, tag, msg string, fields ...log.Field,
) (string, error)

Jump to

Keyboard shortcuts

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