awl/logawl/docs.go
Sam 8df0347891
All checks were successful
continuous-integration/drone/push Build is passing
fix: EDNS cookies work properly (#98)
also slight refactors :)

closes #96

Co-authored-by: Sam Therapy <sam@samtherapy.net>
Reviewed-on: #98
Reviewed-by: grumbulon <grumbulon@grumbulon.xyz>
2022-09-16 23:26:10 +00:00

33 lines
1 KiB
Go

// SPDX-License-Identifier: BSD-3-Clause
/*
Package logawl is a package for custom logging needs
LogAwl extends the standard log library with support for log levels
This is _different_ from the syslog package in the standard library because you do not define a file
because awl is a cli utility it writes directly to std err.
*/
// Use the New() function to init logawl
//
// logger := logawl.New()
//
// You can call specific logging levels from your new logger using
//
// logger.Debug("Message to log")
// logger.Warning("Message to log")
// logger.Info("Message to log")
// logger.Error("Message to log")
//
// You may also set the log level on the fly with
//
// Logger.SetLevel(3)
// This allows you to change the default level (Info)
// and prevent log messages from being posted at higher verbosity levels
// for example if
// Logger.SetLevel(3)
// is not called and you call
// Logger.Debug()
// this runs through
// IsLevel(level)
// to verify if the debug log should be sent to std.Err or not based on the current expected log level
package logawl