Documentation
¶
Overview ¶
pxnGoCommon - Logger @copyright 2026 PoiXson @license AGPL+PXN @author lorenzo at poixson.com @link https://PoiXson.com/
pxnGoCommon - Logger @copyright 2026 PoiXson @license AGPL+PXN @author lorenzo at poixson.com @link https://PoiXson.com/
pxnGoCommon - Logger @copyright 2026 PoiXson @license AGPL+PXN @author lorenzo at poixson.com @link https://PoiXson.com/
pxnGoCommon - Logger @copyright 2026 PoiXson @license AGPL+PXN @author lorenzo at poixson.com @link https://PoiXson.com/
pxnGoCommon - Logger @copyright 2026 PoiXson @license AGPL+PXN @author lorenzo at poixson.com @link https://PoiXson.com/
pxnGoCommon - Logger @copyright 2026 PoiXson @license AGPL+PXN @author lorenzo at poixson.com @link https://PoiXson.com/
Index ¶
- Constants
- Variables
- func Alert(value any)
- func Alertf(format string, args ...any)
- func Debug(value any)
- func Debugf(format string, args ...any)
- func DisableColors()
- func EnableColors()
- func Error(value any)
- func Errorf(format string, args ...any)
- func GetLogLevel() LogLvl.Level
- func GetUseColors() (bool, bool)
- func Info(value any)
- func Infof(format string, args ...any)
- func IsDebug() bool
- func IsFile(file string) bool
- func IsLoggable(level LogLvl.Level) bool
- func Notice(value any)
- func Noticef(format string, args ...any)
- func Panic(value any)
- func Panicf(format string, args ...any)
- func Print(value any)
- func Printf(format string, args ...any)
- func Println()
- func RegisterLogger(log Logger)
- func SetDebug(val bool) bool
- func SetEnableColors(enabled bool)
- func SetLogLevel(level LogLvl.Level)
- func SetQuiet()
- func SetVerbose()
- func Warn(value any)
- func Warnf(format string, args ...any)
- type LogHandler
- type Logger
- type Record
Constants ¶
const DebugFile = ".debug"
const DefaultDebugMode = false
const DefaultLogLevel = LogLvl.Info
Variables ¶
var (
ErrRootLoggerAlreadyRegistered = Errs.New("Root logger already registered!")
)
Functions ¶
func DisableColors ¶
func DisableColors()
func EnableColors ¶
func EnableColors()
func IsLoggable ¶
func RegisterLogger ¶
func RegisterLogger(log Logger)
func SetEnableColors ¶
func SetEnableColors(enabled bool)
func SetLogLevel ¶
Types ¶
type LogHandler ¶
type Logger ¶
type Logger interface {
GetLogType() string
// handler
GetHandler() LogHandler
SetHandler(hand LogHandler) LogHandler
// publish
Publish(rec *Record)
Println()
Print(value any)
Debug(value any)
Info(value any)
Alert(value any)
Notice(value any)
Warn(value any)
Error(value any)
Panic(value any)
Printf(format string, args ...any)
Debugf(format string, args ...any)
Infof(format string, args ...any)
Alertf(format string, args ...any)
Noticef(format string, args ...any)
Warnf(format string, args ...any)
Errorf(format string, args ...any)
Panicf(format string, args ...any)
}
Directories
¶
| Path | Synopsis |
|---|---|
|
pxnGoCommon - Logger @copyright 2026 PoiXson @license AGPL+PXN @author lorenzo at poixson.com @link https://PoiXson.com/
|
pxnGoCommon - Logger @copyright 2026 PoiXson @license AGPL+PXN @author lorenzo at poixson.com @link https://PoiXson.com/ |
|
pxnGoCommon - Logger @copyright 2026 PoiXson @license AGPL+PXN @author lorenzo at poixson.com @link https://PoiXson.com/
|
pxnGoCommon - Logger @copyright 2026 PoiXson @license AGPL+PXN @author lorenzo at poixson.com @link https://PoiXson.com/ |
|
pxnGoCommon - Standard Logger @copyright 2026 PoiXson @license AGPL+PXN @author lorenzo at poixson.com @link https://PoiXson.com/
|
pxnGoCommon - Standard Logger @copyright 2026 PoiXson @license AGPL+PXN @author lorenzo at poixson.com @link https://PoiXson.com/ |