Logo

0x5a.live

for different kinds of informations and explorations.

GitHub - aerogo/log: :memo: Logging with multiple output targets.

:memo: Logging with multiple output targets. Contribute to aerogo/log development by creating an account on GitHub.

Visit SiteGitHub - aerogo/log: :memo: Logging with multiple output targets.

GitHub - aerogo/log: :memo: Logging with multiple output targets.

:memo: Logging with multiple output targets. Contribute to aerogo/log development by creating an account on GitHub.

Powered by 0x5a.live 💗

log

Godoc Report Tests Coverage Sponsor

An O(1) constant time logging system that allows you to connect one log to multiple writers (e.g. stdout, a file and a TCP connection).

Installation

go get -u github.com/aerogo/log/...

Example

hello := log.New()                          // Create a new log
hello.AddWriter(log.File("hello.log"))      // Add a writer

hello.Info("Hello World %d %d %d", 1, 2, 3) // Write non-critical data (buffered)
hello.Error("Something went wrong")         // Force an immediate I/O flush for error messages

Under the hood

All Write calls are queued into a channel that is read in a separate goroutine. Once the channel receives new data it writes the data to all registered outputs.

Style

Please take a look at the style guidelines if you'd like to make a pull request.

Sponsors

Cedric Fung Scott Rayapoullé Eduard Urbach
Cedric Fung Scott Rayapoullé Eduard Urbach

Want to see your own name here?

GoLang Resources

are all listed below.

Resources

listed to get explored on!!

Made with ❤️

to provide different kinds of informations and resources.