package
Version:
v0.28.0
Opens a new window with list of versions in this module.
Published: Dec 21, 2023
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Package logger uses channels to implement non-blocking
logging. Adapted from https://youtu.be/zDCKZn4-dck.
Level: advanced
Topics: design, buffered channels, os/signal
New creates a logger that will write logs to w. Buf is the size of logs buffer.
Stop stops accepting logs and waits for logs buffer to be written.
Write writes the log. If the log buffer is full it prints a warning and exits.
Source Files
¶
Directories
¶
Log handles logging gracefully.
|
Log handles logging gracefully. |
Click to show internal directories.
Click to hide internal directories.