gokitlogger

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

README

Usage logger

Example

go run ./cmd/logger/main.go

Documentation

Index

Constants

View Source
const (
	LevelDebug string = "DEBUG"
	LevelInfo  string = "INFO"
	LevelWarn  string = "WARN"
	LevelError string = "ERROR"
)

Variables

This section is empty.

Functions

func NewLogger

func NewLogger(w io.Writer, options ...Option) gokitlog.Logger

logger := gokitlogger.NewLogger(os.Stdout, gokitlogger.WithJSON(true))

Types

type Option

type Option func(*loggerOptions)

func WithJSON

func WithJSON(json bool) Option

func WithLevel

func WithLevel(level string) Option

func WithTimeFormat

func WithTimeFormat(layout string) Option

Directories

Path Synopsis
cmd
logger command

Jump to

Keyboard shortcuts

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