logger

package module
v0.0.0-...-5a70e7d Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2024 License: Apache-2.0 Imports: 4 Imported by: 6

Documentation

Overview

Multiple Logs GitHub repository:

https://github.com/takecontrolsoft/go_multi_log

Package "logger"

This package provides functions for logging in multiple loggers (console, file and other).

It logs messages, objects and errors in different log levels: "Debug", "Trace", "Info", "Warning", "Error" and "Fatal".

More than one loggers could be registered at the same time.

This package provides implementations of loggers.ConsoleLogger and loggers.FileLogger.

Custom loggers could be also implemented using the loggers.LoggerInterface.

Take Control - software & infrastructure

The package is created and maintained by "Take Control - software & infrastructure".

Web site: https://takecontrolsoft.eu

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(arg any)

Log object in Debug level.

func DebugF

func DebugF(format string, args ...interface{})

Log objects using format string in Debug level.

func DefaultLogger

func DefaultLogger() loggers.LoggerInterface

Return the default instance of loggers.ConsoleLogger.

func Error

func Error(arg any)

Log object in Error level.

func ErrorF

func ErrorF(format string, args ...interface{})

Log objects using format string in Error level.

func Fatal

func Fatal(arg any)

Log object in Fatal level and call Panic to exit.

func FatalF

func FatalF(format string, args ...interface{})

Log objects using format string in Fatal level and call Panic to exit.

func GetLogger

func GetLogger(key string) loggers.LoggerInterface

Return a registered logger instance by key.

func Info

func Info(arg any)

Log object in Info level.

func InfoF

func InfoF(format string, args ...interface{})

Log objects using format string in Info level.

func RegisterLogger

func RegisterLogger(key string, logger loggers.LoggerInterface) error

Register an instance of an additional logger that implements loggers.LoggerInterface.

func Trace

func Trace(arg any)

Log object in Trace level.

func TraceF

func TraceF(format string, args ...interface{})

Log objects using format string in Trace level.

func UnregisterLogger

func UnregisterLogger(key string) error

Unregister an instance of logger by key.

func Warning

func Warning(arg any)

Log object in Warning level.

func WarningF

func WarningF(format string, args ...interface{})

Log objects using format string in Warning level.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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