custom

command
v0.0.0-...-c781833 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

README

Custom formatter

License

This example demonstrates a case where you have a logger that writes to stdout using a custom message formatter.

# install dependencies
$ go get github.com/fatih/color

# build
$ go buid example.go

# run
$ ./custom
severity:EMERGENCY message:system is down
severity:ALERT message:failed to write to disk
severity:CRITICAL message:high server load
severity:ERROR message:invalid number format
message:performance close to 1s threshold severity:WARNING
severity:NOTICE message:failed to communicate with monitoring service
severity:INFO message:requested processed in 250ms
severity:DEBUG debug:var x = 10

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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