Skip to content
/ slog Public

Package slog provides structured logging, in which log records include a message, a severity level, and various other attributes expressed as key-value pairs.

License

Notifications You must be signed in to change notification settings

RealFax/slog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

structured logging

All usage of this package is the same as log/slog

install

go get github.com/RealFax/slog@latest

performance

you can use build tags to declare which JSON serialization method to use

e.g., use the jsoniter flag to declare the use of json-iterator/go

environment variables

LOG_PURE

type: boolean

This variable declares whether colorful output is disabled.

e.g., LOG_PURE=true

LOG_LEVEL

type: string

  • debug
  • info
  • warn
  • error

default: info e.g., LOG_LEVEL=debug || LOG_LEVEL=DEBUG

About

Package slog provides structured logging, in which log records include a message, a severity level, and various other attributes expressed as key-value pairs.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages