logger

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 12 Imported by: 18

Documentation

Index

Constants

View Source
const (
	StyleReset      = "\x1b[0m"
	StyleBold       = "\x1b[1m"
	StyleDim        = "\x1b[2m"
	StyleUnderscore = "\x1b[4m"
	StyleBlink      = "\x1b[5m"
	StyleReverse    = "\x1b[7m"
	StyleHidden     = "\x1b[8m"

	ForegroundBlack   = "\x1b[30m"
	ForegroundRed     = "\x1b[31m"
	ForegroundGreen   = "\x1b[32m"
	ForegroundYellow  = "\x1b[33m"
	ForegroundBlue    = "\x1b[34m"
	ForegroundMagenta = "\x1b[35m"
	ForegroundCyan    = "\x1b[36m"
	ForegroundWhite   = "\x1b[37m"

	BackgroundBlack   = "\x1b[40m"
	BackgroundRed     = "\x1b[41m"
	BackgroundGreen   = "\x1b[42m"
	BackgroundYellow  = "\x1b[43m"
	BackgroundBlue    = "\x1b[44m"
	BackgroundMagenta = "\x1b[45m"
	BackgroundCyan    = "\x1b[46m"
	BackgroundWhite   = "\x1b[47m"
)
View Source
const (
	InfoLevel  level = "INFO"
	DebugLevel level = "DEBUG"
	WarnLevel  level = "WARN"
	ErrorLevel level = "ERROR"
)

Variables

This section is empty.

Functions

func Debug

func Debug(v ...any)

Debug is a function that records informational messages based on the global Options variable, using the level DEBUG.

Usage Example:

logger.Debug("test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] example.go:239: test true 112 10.99

func DebugH

func DebugH(v ...any)

DebugH is a function that records informational messages based on the Options global variable, using the DEBUG level. Unlike Debug, this function will hide all values passed as parameters v when printing the message.

Usage Example:

logger.DebugH("test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] example.go:239: **** **** *** *****

func DebugME

func DebugME(v ...any)

DebugME is a function that records informational messages based on the Options global variable, using the DEBUG level. Unlike Debug, this function will mask the last half of all values passed as parameters v when printing the message.

Usage Example:

logger.DebugME("test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] example.go:239: te** tr** 1** 10***

func DebugMS

func DebugMS(v ...any)

DebugMS is a function that records informational messages based on the Options global variable, using the DEBUG level. Unlike Debug, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.DebugMS("test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] example.go:239: **st **ue **2 ***99

func DebugOpts

func DebugOpts(opts Options, v ...any)

DebugOpts is a function that records informational messages, using the DEBUG level. Unlike Debug, this function passes Options as a parameter, and it will only be persisted in that message, therefore, this Options passed as a parameter will not impact other flows using global Options.

Usage Example:

logger.DebugOpts(Options{}, "test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] example.go:239: test true 112 10.99

func DebugOptsH

func DebugOptsH(opts Options, v ...any)

DebugOptsH is a function that records informative messages based on the Options variable passed as a parameter, using the DEBUG level. Unlike DebugOpts, this function will hide all values passed as parameters v when printing the message.

Usage Example:

logger.DebugOptsH(Options{}, "test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] example.go:239: ****, ****, ***, *****

func DebugOptsME

func DebugOptsME(opts Options, v ...any)

DebugOptsME is a function that records informative messages based on the Options variable passed as a parameter, using the DEBUG level. Unlike DebugOpts, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.DebugOptsME(Options{}, "test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] example.go:239: te** tr** 1** 10***

func DebugOptsMS

func DebugOptsMS(opts Options, v ...any)

DebugOptsMS is a function that records informative messages based on the Options variable passed as a parameter, using the DEBUG level. Unlike DebugOpts, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.DebugOptsMS(Options{}, "test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] example.go:239: **st **ue **2 ***99

func DebugOptsf

func DebugOptsf(format string, opts Options, v ...any)

DebugOptsf is a function that records informational messages based on the Options variable passed as a parameter, using the DEBUG level. Unlike DebugOpts, this function passes the format you want as a parameter, so the value passed will impact the format of the printed message.

Usage Example:

logger.DebugOptsf("%s, %s, %s, last is %s", Options{}, "test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] example.go:239: test, true, 112, last is 10.99

func DebugOptsfH

func DebugOptsfH(format string, opts Options, v ...any)

DebugOptsfH is a function that records informational messages based on the Options variable passed as a parameter, using the DEBUG level, print the parameters v also based on the format entered as a parameter. Unlike DebugOptsf, this function will hide all values passed as parameters v when printing the message.

Usage Example:

logger.DebugOptsfH("%s, %s, %s, last is %s", Options{}, "test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] example.go:239: ****, ****, ***, last is *****

func DebugOptsfME

func DebugOptsfME(format string, opts Options, v ...any)

DebugOptsfME is a function that records informational messages based on the Options variable passed as a parameter, using the DEBUG level, print the parameters v also based on the format entered as a parameter. Unlike DebugOptsf, this function will mask the last half of all values passed as parameters v when printing the message.

Usage Example:

logger.DebugOptsfME("%s, %s, %s, last is %s", Options{}, "test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] example.go:239: te**, tr**, 1**, last is 10***

func DebugOptsfMS

func DebugOptsfMS(format string, opts Options, v ...any)

DebugOptsfMS is a function that records informational messages based on the Options variable passed as a parameter, using the DEBUG level, print the parameters v also based on the format entered as a parameter. Unlike DebugOptsf, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.DebugOptsfMS("%s, %s, %s, last is %s", Options{}, "test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] example.go:239: **st, **ue, **2, last is ***99

func DebugSkipCaller

func DebugSkipCaller(skipCaller int, v ...any)

DebugSkipCaller is a function that logs informational messages based on the Options global variable, using the DEBUG level. Unlike Debug, this function passes skipCaller as a parameter, therefore the value passed directly impacts the file name and line when printing the message.

Usage Example:

logger.DebugSkipCaller(2, "test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] subexample.go:139: te** tr** 1** 10***

func DebugSkipCallerH

func DebugSkipCallerH(skipCaller int, v ...any)

DebugSkipCallerH is a function that logs informational messages based on the Options global variable, using the DEBUG level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike DebugSkipCaller, this function will hide all values passed as parameters v when printing the message.

Usage Example:

logger.DebugSkipCallerH(2, "test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] subexample.go:239: ****, ****, ***, *****

func DebugSkipCallerME

func DebugSkipCallerME(skipCaller int, v ...any)

DebugSkipCallerME is a function that logs informational messages based on the Options global variable, using the DEBUG level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike DebugSkipCaller, this function will mask the last half of all values passed as parameters v when printing the message.

Usage Example:

logger.DebugSkipCallerME(2, "test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] example.go:239: te** tr** 1** 10***

func DebugSkipCallerMS

func DebugSkipCallerMS(skipCaller int, v ...any)

DebugSkipCallerMS is a function that logs informational messages based on the Options global variable, using the DEBUG level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike DebugSkipCaller, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.DebugSkipCallerMS(2, "test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] subexample.go:239: **st **ue **2 ***99

func DebugSkipCallerOpts

func DebugSkipCallerOpts(skipCaller int, opts Options, v ...any)

DebugSkipCallerOpts is a function that records informational messages, using the DEBUG level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike DebugSkipCaller, this function passes Options as a parameter, and it will only be persisted in that message, therefore, this Options passed as a parameter will not impact other flows using global Options.

Usage Example:

logger.DebugSkipCallerOpts(2, Options{}, "test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] subexample.go:239: test, true, 112, last is 10.99

func DebugSkipCallerOptsH

func DebugSkipCallerOptsH(skipCaller int, opts Options, v ...any)

DebugSkipCallerOptsH is a function that records informational messages based on the Options variable passed as a parameter, using the DEBUG level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike DebugSkipCallerOpts, this function will hide all values passed as parameters v when printing the message.

Usage Example:

logger.DebugSkipCallerOptsH(2, Options{}, "test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] subexample.go:23: **** **** *** *****

func DebugSkipCallerOptsME

func DebugSkipCallerOptsME(skipCaller int, opts Options, v ...any)

DebugSkipCallerOptsME is a function that records informational messages based on the Options variable passed as a parameter, using the DEBUG level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike DebugSkipCallerOpts, this function will mask the last half of all values passed as parameters v when printing the message.

Usage Example:

logger.DebugSkipCallerOptsME(2, Options{}, "test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] subexample.go:239: te** tr** 1** 10***

func DebugSkipCallerOptsMS

func DebugSkipCallerOptsMS(skipCaller int, opts Options, v ...any)

DebugSkipCallerOptsMS is a function that records informational messages based on the Options variable passed as a parameter, using the DEBUG level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike DebugSkipCallerOpts, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.DebugSkipCallerOptsMS(2, Options{}, "test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] subexample.go:239: **st **ue **2 ***99

func DebugSkipCallerOptsf

func DebugSkipCallerOptsf(format string, skipCaller int, opts Options, v ...any)

DebugSkipCallerOptsf is a function that records informational messages based on the Options variable passed as a parameter, using the DEBUG level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike DebugSkipCallerOpts, this function passes the format you want as a parameter, so the value passed will impact the format of the printed message.

Usage Example:

logger.DebugSkipCallerOptsf("%s, %s, %s, last is %s", 2, Options{}, "test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] subexample.go:239: test, true, 112, last is 10.99

func DebugSkipCallerOptsfH

func DebugSkipCallerOptsfH(format string, skipCaller int, opts Options, v ...any)

DebugSkipCallerOptsfH is a function that records informational messages based on the Options variable passed as a parameter, using the DEBUG level. The file name and line information in the message will be based on the value of the skipCaller parameter, this function also prints the v parameters based on the format passed in the format parameter. Unlike DebugSkipCallerOptsf, this function will mask the last half of all values passed as v settings when printing a message.

Usage Example:

logger.DebugSkipCallerOptsfH("%s, %s, %s, last is %s", 2, Options{}, "test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] subexample.go:23: ****, ****, ***, last is *****

func DebugSkipCallerOptsfME

func DebugSkipCallerOptsfME(format string, skipCaller int, opts Options, v ...any)

DebugSkipCallerOptsfME is a function that records informational messages based on the Options variable passed as a parameter, using the DEBUG level. The file name and line information in the message will be based on the value of the skipCaller parameter, this function also prints the v parameters based on the format passed in the format parameter. Unlike DebugSkipCallerOptsf, this function will mask the last half of all values passed as parameters v when printing the message.

Usage Example:

logger.DebugSkipCallerOptsfME("%s, %s, %s, last is %s", 2, Options{}, "test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] subexample.go:239: te**, tr**, 1**, last is 10***

func DebugSkipCallerOptsfMS

func DebugSkipCallerOptsfMS(format string, skipCaller int, opts Options, v ...any)

DebugSkipCallerOptsfMS is a function that records informational messages based on the Options variable passed as a parameter, using the DEBUG level. The file name and line information in the message will be based on the value of the skipCaller parameter, this function also prints the v parameters based on the format passed in the format parameter. Unlike DebugSkipCallerOptsf, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.DebugSkipCallerOptsfMS("%s, %s, %s, last is %s", 2, Options{}, "test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] subexample.go:239: **st, **ue, **2, last is ***99

func DebugSkipCallerf

func DebugSkipCallerf(format string, skipCaller int, v ...any)

DebugSkipCallerf is a function that logs informational messages based on the Options global variable, using the DEBUG level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike DebugSkipCaller, this function passes the format you want as a parameter, so the value passed will have an impact on the format of the printed message.

Usage Example:

logger.DebugSkipCallerf("%s, %s, %s, last is %s", 2, "test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] subexample.go:239: test, true, 112, last is 10.99

func DebugSkipCallerfH

func DebugSkipCallerfH(format string, skipCaller int, v ...any)

DebugSkipCallerfH is a function that writes informational messages based on the Options global variable, using the DEBUG level. The file name and the line information in the message will be based on the value of the skipCaller parameter, this function also prints the v parameters based on the format passed in the format parameter. Unlike DebugSkipCallerf, this function will hide all values passed as parameters v when printing the message.

Usage Example:

logger.DebugSkipCallerfH("%s, %s, %s, last is %s", 2, "test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] subexample.go:23: ****, ****, ***, last is *****

func DebugSkipCallerfME

func DebugSkipCallerfME(format string, skipCaller int, v ...any)

DebugSkipCallerfME is a function that writes informational messages based on the Options global variable, using the DEBUG level. The file name and the line information in the message will be based on the value of the skipCaller parameter, this function also prints the v parameters based on the format passed in the format parameter. Unlike DebugSkipCallerf, this function will mask the last half of all values passed as parameters v when printing the message.

Usage Example:

logger.DebugSkipCallerfME("%s, %s, %s, last is %s", 2, "test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] subexample.go:239: te**, tr**, 1**, last is 10***

func DebugSkipCallerfMS

func DebugSkipCallerfMS(format string, skipCaller int, v ...any)

DebugSkipCallerfMS is a function that writes informational messages based on the Options global variable, using the DEBUG level. The file name and the line information in the message will be based on the value of the skipCaller parameter, this function also prints the v parameters based on the format passed in the format parameter. Unlike DebugSkipCallerf, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.DebugSkipCallerfMS("%s, %s, %s, last is %s", 2, "test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] subexample.go:239: **st, **ue, **2, last is ***99

func Debugf

func Debugf(format string, v ...any)

Debugf is a function that records informational messages based on the Options global variable, using the DEBUG level. Unlike Debug, this function passes the format you want as a parameter, so the value passed will impact the format of the printed message.

Usage Example:

logger.Debugf("%s, %s, %s, last is %s", "test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] example.go:239: test, true, 112, last is 10.99

func DebugfH

func DebugfH(format string, v ...any)

DebugfH is a function that records informational messages based on the Options global variable, using the DEBUG level, printing the parameters v based on the format entered as a parameter. Unlike Debugf, this function will hide all values passed as parameters v when printing the message.

Usage Example:

logger.DebugfH("%s, %s, %s, last is %s", "test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] example.go:239: ****, ****, ***, last is *****

func DebugfME

func DebugfME(format string, v ...any)

DebugfME is a function that records informational messages based on the Options global variable, using the DEBUG level, printing the parameters v based on the format entered as a parameter. Unlike Debugf, this function will mask the last half of all values passed as parameters v when printing the message.

Usage Example:

logger.DebugfME("%s, %s, %s, last is %s", "test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] example.go:239: te**, tr**, 1**, last is 10***

func DebugfMS

func DebugfMS(format string, v ...any)

DebugfMS is a function that records informational messages based on the Options global variable, using the DEBUG level, printing the parameters v based on the format entered as a parameter. Unlike Debugf, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.DebugfMS("%s, %s, %s, last is %s", "test", true, 112, 10.99)

Result (default):

[DEBUG 2023/12/09 19:26:09] example.go:239: **st, **ue, **2, last is ***99

func Error

func Error(v ...any)

Error is a function that records informational messages based on the global Options variable, using the level ERROR.

Usage Example:

logger.Error("test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] example.go:239: test true 112 10.99

func ErrorH

func ErrorH(v ...any)

ErrorH is a function that records informational messages based on the Options global variable, using the ERROR level. Unlike Error, this function will hide all values passed as parameters v when printing the message.

Usage Example:

logger.ErrorH("test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] example.go:239: **** **** *** *****

func ErrorME

func ErrorME(v ...any)

ErrorME is a function that records informational messages based on the Options global variable, using the ERROR level. Unlike Error, this function will mask the last half of all values passed as parameters v when printing the message.

Usage Example:

logger.ErrorME("test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] example.go:239: te** tr** 1** 10***

func ErrorMS

func ErrorMS(v ...any)

ErrorMS is a function that records informational messages based on the Options global variable, using the ERROR level. Unlike Error, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.ErrorMS("test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] example.go:239: **st **ue **2 ***99

func ErrorOpts

func ErrorOpts(opts Options, v ...any)

ErrorOpts is a function that records informational messages, using the ERROR level. Unlike Error, this function passes Options as a parameter, and it will only be persisted in that message, therefore, this Options passed as a parameter will not impact other flows using global Options.

Usage Example:

logger.ErrorOpts(Options{}, "test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] example.go:239: test true 112 10.99

func ErrorOptsH

func ErrorOptsH(opts Options, v ...any)

ErrorOptsH is a function that records informative messages based on the Options variable passed as a parameter, using the ERROR level. Unlike ErrorOpts, this function will hide all values passed as parameters v when printing the message.

Usage Example:

logger.ErrorOptsH(Options{}, "test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] example.go:239: ****, ****, ***, *****

func ErrorOptsME

func ErrorOptsME(opts Options, v ...any)

ErrorOptsME is a function that records informative messages based on the Options variable passed as a parameter, using the ERROR level. Unlike ErrorOpts, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.ErrorOptsME(Options{}, "test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] example.go:239: te** tr** 1** 10***

func ErrorOptsMS

func ErrorOptsMS(opts Options, v ...any)

ErrorOptsMS is a function that records informative messages based on the Options variable passed as a parameter, using the ERROR level. Unlike ErrorOpts, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.ErrorOptsMS(Options{}, "test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] example.go:239: **st **ue **2 ***99

func ErrorOptsf

func ErrorOptsf(format string, opts Options, v ...any)

ErrorOptsf is a function that records informational messages based on the Options variable passed as a parameter, using the ERROR level. Unlike ErrorOpts, this function passes the format you want as a parameter, so the value passed will impact the format of the printed message.

Usage Example:

logger.ErrorOptsf("%s, %s, %s, last is %s", Options{}, "test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] example.go:239: test, true, 112, last is 10.99

func ErrorOptsfH

func ErrorOptsfH(format string, opts Options, v ...any)

ErrorOptsfH is a function that records informational messages based on the Options variable passed as a parameter, using the ERROR level, print the parameters v also based on the format entered as a parameter. Unlike ErrorOptsf, this function will hide all values passed as parameters v when printing the message.

Usage Example:

logger.ErrorOptsfH("%s, %s, %s, last is %s", Options{}, "test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] example.go:239: ****, ****, ***, last is *****

func ErrorOptsfME

func ErrorOptsfME(format string, opts Options, v ...any)

ErrorOptsfME is a function that records informational messages based on the Options variable passed as a parameter, using the ERROR level, print the parameters v also based on the format entered as a parameter. Unlike ErrorOptsf, this function will mask the last half of all values passed as parameters v when printing the message.

Usage Example:

logger.ErrorOptsfME("%s, %s, %s, last is %s", Options{}, "test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] example.go:239: te**, tr**, 1**, last is 10***

func ErrorOptsfMS

func ErrorOptsfMS(format string, opts Options, v ...any)

ErrorOptsfMS is a function that records informational messages based on the Options variable passed as a parameter, using the ERROR level, print the parameters v also based on the format entered as a parameter. Unlike ErrorOptsf, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.ErrorOptsfMS("%s, %s, %s, last is %s", Options{}, "test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] example.go:239: **st, **ue, **2, last is ***99

func ErrorSkipCaller

func ErrorSkipCaller(skipCaller int, v ...any)

ErrorSkipCaller is a function that logs informational messages based on the Options global variable, using the ERROR level. Unlike Error, this function passes skipCaller as a parameter, therefore the value passed directly impacts the file name and line when printing the message.

Usage Example:

logger.ErrorSkipCaller(2, "test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] subexample.go:139: te** tr** 1** 10***

func ErrorSkipCallerH

func ErrorSkipCallerH(skipCaller int, v ...any)

ErrorSkipCallerH is a function that logs informational messages based on the Options global variable, using the ERROR level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike ErrorSkipCaller, this function will hide all values passed as parameters v when printing the message.

Usage Example:

logger.ErrorSkipCallerH(2, "test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] subexample.go:239: ****, ****, ***, *****

func ErrorSkipCallerME

func ErrorSkipCallerME(skipCaller int, v ...any)

ErrorSkipCallerME is a function that logs informational messages based on the Options global variable, using the ERROR level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike ErrorSkipCaller, this function will mask the last half of all values passed as parameters v when printing the message.

Usage Example:

logger.ErrorSkipCallerME(2, "test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] example.go:239: te** tr** 1** 10***

func ErrorSkipCallerMS

func ErrorSkipCallerMS(skipCaller int, v ...any)

ErrorSkipCallerMS is a function that logs informational messages based on the Options global variable, using the ERROR level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike ErrorSkipCaller, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.ErrorSkipCallerMS(2, "test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] subexample.go:239: **st **ue **2 ***99

func ErrorSkipCallerOpts

func ErrorSkipCallerOpts(skipCaller int, opts Options, v ...any)

ErrorSkipCallerOpts is a function that records informational messages, using the ERROR level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike ErrorSkipCaller, this function passes Options as a parameter, and it will only be persisted in that message, therefore, this Options passed as a parameter will not impact other flows using global Options.

Usage Example:

logger.ErrorSkipCallerOpts(2, Options{}, "test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] subexample.go:239: test, true, 112, last is 10.99

func ErrorSkipCallerOptsH

func ErrorSkipCallerOptsH(skipCaller int, opts Options, v ...any)

ErrorSkipCallerOptsH is a function that records informational messages based on the Options variable passed as a parameter, using the ERROR level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike ErrorSkipCallerOpts, this function will hide all values passed as parameters v when printing the message.

Usage Example:

logger.ErrorSkipCallerOptsH(2, Options{}, "test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] subexample.go:23: **** **** *** *****

func ErrorSkipCallerOptsME

func ErrorSkipCallerOptsME(skipCaller int, opts Options, v ...any)

ErrorSkipCallerOptsME is a function that records informational messages based on the Options variable passed as a parameter, using the ERROR level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike ErrorSkipCallerOpts, this function will mask the last half of all values passed as parameters v when printing the message.

Usage Example:

logger.ErrorSkipCallerOptsME(2, Options{}, "test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] subexample.go:239: te** tr** 1** 10***

func ErrorSkipCallerOptsMS

func ErrorSkipCallerOptsMS(skipCaller int, opts Options, v ...any)

ErrorSkipCallerOptsMS is a function that records informational messages based on the Options variable passed as a parameter, using the ERROR level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike ErrorSkipCallerOpts, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.ErrorSkipCallerOptsMS(2, Options{}, "test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] subexample.go:239: **st **ue **2 ***99

func ErrorSkipCallerOptsf

func ErrorSkipCallerOptsf(format string, skipCaller int, opts Options, v ...any)

ErrorSkipCallerOptsf is a function that records informational messages based on the Options variable passed as a parameter, using the ERROR level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike ErrorSkipCallerOpts, this function passes the format you want as a parameter, so the value passed will impact the format of the printed message.

Usage Example:

logger.ErrorSkipCallerOptsf("%s, %s, %s, last is %s", 2, Options{}, "test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] subexample.go:239: test, true, 112, last is 10.99

func ErrorSkipCallerOptsfH

func ErrorSkipCallerOptsfH(format string, skipCaller int, opts Options, v ...any)

ErrorSkipCallerOptsfH is a function that records informational messages based on the Options variable passed as a parameter, using the ERROR level. The file name and line information in the message will be based on the value of the skipCaller parameter, this function also prints the v parameters based on the format passed in the format parameter. Unlike ErrorSkipCallerOptsf, this function will mask the last half of all values passed as v settings when printing a message.

Usage Example:

logger.ErrorSkipCallerOptsfH("%s, %s, %s, last is %s", 2, Options{}, "test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] subexample.go:23: ****, ****, ***, last is *****

func ErrorSkipCallerOptsfME

func ErrorSkipCallerOptsfME(format string, skipCaller int, opts Options, v ...any)

ErrorSkipCallerOptsfME is a function that records informational messages based on the Options variable passed as a parameter, using the ERROR level. The file name and line information in the message will be based on the value of the skipCaller parameter, this function also prints the v parameters based on the format passed in the format parameter. Unlike ErrorSkipCallerOptsf, this function will mask the last half of all values passed as parameters v when printing the message.

Usage Example:

logger.ErrorSkipCallerOptsfME("%s, %s, %s, last is %s", 2, Options{}, "test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] subexample.go:239: te**, tr**, 1**, last is 10***

func ErrorSkipCallerOptsfMS

func ErrorSkipCallerOptsfMS(format string, skipCaller int, opts Options, v ...any)

ErrorSkipCallerOptsfMS is a function that records informational messages based on the Options variable passed as a parameter, using the ERROR level. The file name and line information in the message will be based on the value of the skipCaller parameter, this function also prints the v parameters based on the format passed in the format parameter. Unlike ErrorSkipCallerOptsf, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.ErrorSkipCallerOptsfMS("%s, %s, %s, last is %s", 2, Options{}, "test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] subexample.go:239: **st, **ue, **2, last is ***99

func ErrorSkipCallerf

func ErrorSkipCallerf(format string, skipCaller int, v ...any)

ErrorSkipCallerf is a function that logs informational messages based on the Options global variable, using the ERROR level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike ErrorSkipCaller, this function passes the format you want as a parameter, so the value passed will have an impact on the format of the printed message.

Usage Example:

logger.ErrorSkipCallerf("%s, %s, %s, last is %s", 2, "test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] subexample.go:239: test, true, 112, last is 10.99

func ErrorSkipCallerfH

func ErrorSkipCallerfH(format string, skipCaller int, v ...any)

ErrorSkipCallerfH is a function that writes informational messages based on the Options global variable, using the ERROR level. The file name and the line information in the message will be based on the value of the skipCaller parameter, this function also prints the v parameters based on the format passed in the format parameter. Unlike ErrorSkipCallerf, this function will hide all values passed as parameters v when printing the message.

Usage Example:

logger.ErrorSkipCallerfH("%s, %s, %s, last is %s", 2, "test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] subexample.go:23: ****, ****, ***, last is *****

func ErrorSkipCallerfME

func ErrorSkipCallerfME(format string, skipCaller int, v ...any)

ErrorSkipCallerfME is a function that writes informational messages based on the Options global variable, using the ERROR level. The file name and the line information in the message will be based on the value of the skipCaller parameter, this function also prints the v parameters based on the format passed in the format parameter. Unlike ErrorSkipCallerf, this function will mask the last half of all values passed as parameters v when printing the message.

Usage Example:

logger.ErrorSkipCallerfME("%s, %s, %s, last is %s", 2, "test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] subexample.go:239: te**, tr**, 1**, last is 10***

func ErrorSkipCallerfMS

func ErrorSkipCallerfMS(format string, skipCaller int, v ...any)

ErrorSkipCallerfMS is a function that writes informational messages based on the Options global variable, using the ERROR level. The file name and the line information in the message will be based on the value of the skipCaller parameter, this function also prints the v parameters based on the format passed in the format parameter. Unlike ErrorSkipCallerf, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.ErrorSkipCallerfMS("%s, %s, %s, last is %s", 2, "test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] subexample.go:239: **st, **ue, **2, last is ***99

func Errorf

func Errorf(format string, v ...any)

Errorf is a function that records informational messages based on the Options global variable, using the ERROR level. Unlike Error, this function passes the format you want as a parameter, so the value passed will impact the format of the printed message.

Usage Example:

logger.Errorf("%s, %s, %s, last is %s", "test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] example.go:239: test, true, 112, last is 10.99

func ErrorfH

func ErrorfH(format string, v ...any)

ErrorfH is a function that records informational messages based on the Options global variable, using the ERROR level, printing the parameters v based on the format entered as a parameter. Unlike Errorf, this function will hide all values passed as parameters v when printing the message.

Usage Example:

logger.ErrorfH("%s, %s, %s, last is %s", "test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] example.go:239: ****, ****, ***, last is *****

func ErrorfME

func ErrorfME(format string, v ...any)

ErrorfME is a function that records informational messages based on the Options global variable, using the ERROR level, printing the parameters v based on the format entered as a parameter. Unlike Errorf, this function will mask the last half of all values passed as parameters v when printing the message.

Usage Example:

logger.ErrorfME("%s, %s, %s, last is %s", "test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] example.go:239: te**, tr**, 1**, last is 10***

func ErrorfMS

func ErrorfMS(format string, v ...any)

ErrorfMS is a function that records informational messages based on the Options global variable, using the ERROR level, printing the parameters v based on the format entered as a parameter. Unlike Errorf, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.ErrorfMS("%s, %s, %s, last is %s", "test", true, 112, 10.99)

Result (default):

[ERROR 2023/12/09 19:26:09] example.go:239: **st, **ue, **2, last is ***99

func Info

func Info(v ...any)

Info is a function that records informational messages based on the global Options variable, using the level INFO.

Usage Example:

logger.Info("test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] example.go:239: test true 112 10.99

func InfoH

func InfoH(v ...any)

InfoH is a function that records informational messages based on the Options global variable, using the INFO level. Unlike Info, this function will hide all values passed as parameters v when printing the message.

Usage Example:

logger.InfoH("test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] example.go:239: **** **** *** *****

func InfoME

func InfoME(v ...any)

InfoME is a function that records informational messages based on the Options global variable, using the INFO level. Unlike Info, this function will mask the last half of all values passed as parameters v when printing the message.

Usage Example:

logger.InfoME("test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] example.go:239: te** tr** 1** 10***

func InfoMS

func InfoMS(v ...any)

InfoMS is a function that records informational messages based on the Options global variable, using the INFO level. Unlike Info, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.InfoMS("test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] example.go:239: **st **ue **2 ***99

func InfoOpts

func InfoOpts(opts Options, v ...any)

InfoOpts is a function that records informational messages, using the INFO level. Unlike Info, this function passes Options as a parameter, and it will only be persisted in that message, therefore, this Options passed as a parameter will not impact other flows using global Options.

Usage Example:

logger.InfoOpts(Options{}, "test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] example.go:239: test true 112 10.99

func InfoOptsH

func InfoOptsH(opts Options, v ...any)

InfoOptsH is a function that records informative messages based on the Options variable passed as a parameter, using the INFO level. Unlike InfoOpts, this function will hide all values passed as parameters v when printing the message.

Usage Example:

logger.InfoOptsH(Options{}, "test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] example.go:239: ****, ****, ***, *****

func InfoOptsME

func InfoOptsME(opts Options, v ...any)

InfoOptsME is a function that records informative messages based on the Options variable passed as a parameter, using the INFO level. Unlike InfoOpts, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.InfoOptsME(Options{}, "test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] example.go:239: te** tr** 1** 10***

func InfoOptsMS

func InfoOptsMS(opts Options, v ...any)

InfoOptsMS is a function that records informative messages based on the Options variable passed as a parameter, using the INFO level. Unlike InfoOpts, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.InfoOptsMS(Options{}, "test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] example.go:239: **st **ue **2 ***99

func InfoOptsf

func InfoOptsf(format string, opts Options, v ...any)

InfoOptsf is a function that records informational messages based on the Options variable passed as a parameter, using the INFO level. Unlike InfoOpts, this function passes the format you want as a parameter, so the value passed will impact the format of the printed message.

Usage Example:

logger.InfoOptsf("%s, %s, %s, last is %s", Options{}, "test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] example.go:239: test, true, 112, last is 10.99

func InfoOptsfH

func InfoOptsfH(format string, opts Options, v ...any)

InfoOptsfH is a function that records informational messages based on the Options variable passed as a parameter, using the INFO level, print the parameters v also based on the format entered as a parameter. Unlike InfoOptsf, this function will hide all values passed as parameters v when printing the message.

Usage Example:

logger.InfoOptsfH("%s, %s, %s, last is %s", Options{}, "test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] example.go:239: ****, ****, ***, last is *****

func InfoOptsfME

func InfoOptsfME(format string, opts Options, v ...any)

InfoOptsfME is a function that records informational messages based on the Options variable passed as a parameter, using the INFO level, print the parameters v also based on the format entered as a parameter. Unlike InfoOptsf, this function will mask the last half of all values passed as parameters v when printing the message.

Usage Example:

logger.InfoOptsfME("%s, %s, %s, last is %s", Options{}, "test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] example.go:239: te**, tr**, 1**, last is 10***

func InfoOptsfMS

func InfoOptsfMS(format string, opts Options, v ...any)

InfoOptsfMS is a function that records informational messages based on the Options variable passed as a parameter, using the INFO level, print the parameters v also based on the format entered as a parameter. Unlike InfoOptsf, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.InfoOptsfMS("%s, %s, %s, last is %s", Options{}, "test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] example.go:239: **st, **ue, **2, last is ***99

func InfoSkipCaller

func InfoSkipCaller(skipCaller int, v ...any)

InfoSkipCaller is a function that logs informational messages based on the Options global variable, using the INFO level. Unlike Info, this function passes skipCaller as a parameter, therefore the value passed directly impacts the file name and line when printing the message.

Usage Example:

logger.InfoSkipCaller(2, "test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] subexample.go:139: te** tr** 1** 10***

func InfoSkipCallerH

func InfoSkipCallerH(skipCaller int, v ...any)

InfoSkipCallerH is a function that logs informational messages based on the Options global variable, using the INFO level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike InfoSkipCaller, this function will hide all values passed as parameters v when printing the message.

Usage Example:

logger.InfoSkipCallerH(2, "test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] subexample.go:239: ****, ****, ***, *****

func InfoSkipCallerME

func InfoSkipCallerME(skipCaller int, v ...any)

InfoSkipCallerME is a function that logs informational messages based on the Options global variable, using the INFO level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike InfoSkipCaller, this function will mask the last half of all values passed as parameters v when printing the message.

Usage Example:

logger.InfoSkipCallerME(2, "test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] example.go:239: te** tr** 1** 10***

func InfoSkipCallerMS

func InfoSkipCallerMS(skipCaller int, v ...any)

InfoSkipCallerMS is a function that logs informational messages based on the Options global variable, using the INFO level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike InfoSkipCaller, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.InfoSkipCallerMS(2, "test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] subexample.go:239: **st **ue **2 ***99

func InfoSkipCallerOpts

func InfoSkipCallerOpts(skipCaller int, opts Options, v ...any)

InfoSkipCallerOpts is a function that records informational messages, using the INFO level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike InfoSkipCaller, this function passes Options as a parameter, and it will only be persisted in that message, therefore, this Options passed as a parameter will not impact other flows using global Options.

Usage Example:

logger.InfoSkipCallerOpts(2, Options{}, "test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] subexample.go:239: test, true, 112, last is 10.99

func InfoSkipCallerOptsH

func InfoSkipCallerOptsH(skipCaller int, opts Options, v ...any)

InfoSkipCallerOptsH is a function that records informational messages based on the Options variable passed as a parameter, using the INFO level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike InfoSkipCallerOpts, this function will hide all values passed as parameters v when printing the message.

Usage Example:

logger.InfoSkipCallerOptsH(2, Options{}, "test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] subexample.go:23: **** **** *** *****

func InfoSkipCallerOptsME

func InfoSkipCallerOptsME(skipCaller int, opts Options, v ...any)

InfoSkipCallerOptsME is a function that records informational messages based on the Options variable passed as a parameter, using the INFO level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike InfoSkipCallerOpts, this function will mask the last half of all values passed as parameters v when printing the message.

Usage Example:

logger.InfoSkipCallerOptsME(2, Options{}, "test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] subexample.go:239: te** tr** 1** 10***

func InfoSkipCallerOptsMS

func InfoSkipCallerOptsMS(skipCaller int, opts Options, v ...any)

InfoSkipCallerOptsMS is a function that records informational messages based on the Options variable passed as a parameter, using the INFO level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike InfoSkipCallerOpts, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.InfoSkipCallerOptsMS(2, Options{}, "test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] subexample.go:239: **st **ue **2 ***99

func InfoSkipCallerOptsf

func InfoSkipCallerOptsf(format string, skipCaller int, opts Options, v ...any)

InfoSkipCallerOptsf is a function that records informational messages based on the Options variable passed as a parameter, using the INFO level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike InfoSkipCallerOpts, this function passes the format you want as a parameter, so the value passed will impact the format of the printed message.

Usage Example:

logger.InfoSkipCallerOptsf("%s, %s, %s, last is %s", 2, Options{}, "test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] subexample.go:239: test, true, 112, last is 10.99

func InfoSkipCallerOptsfH

func InfoSkipCallerOptsfH(format string, skipCaller int, opts Options, v ...any)

InfoSkipCallerOptsfH is a function that records informational messages based on the Options variable passed as a parameter, using the INFO level. The file name and line information in the message will be based on the value of the skipCaller parameter, this function also prints the v parameters based on the format passed in the format parameter. Unlike InfoSkipCallerOptsf, this function will mask the last half of all values passed as v settings when printing a message.

Usage Example:

logger.InfoSkipCallerOptsfH("%s, %s, %s, last is %s", 2, Options{}, "test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] subexample.go:23: ****, ****, ***, last is *****

func InfoSkipCallerOptsfME

func InfoSkipCallerOptsfME(format string, skipCaller int, opts Options, v ...any)

InfoSkipCallerOptsfME is a function that records informational messages based on the Options variable passed as a parameter, using the INFO level. The file name and line information in the message will be based on the value of the skipCaller parameter, this function also prints the v parameters based on the format passed in the format parameter. Unlike InfoSkipCallerOptsf, this function will mask the last half of all values passed as parameters v when printing the message.

Usage Example:

logger.InfoSkipCallerOptsfME("%s, %s, %s, last is %s", 2, Options{}, "test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] subexample.go:239: te**, tr**, 1**, last is 10***

func InfoSkipCallerOptsfMS

func InfoSkipCallerOptsfMS(format string, skipCaller int, opts Options, v ...any)

InfoSkipCallerOptsfMS is a function that records informational messages based on the Options variable passed as a parameter, using the INFO level. The file name and line information in the message will be based on the value of the skipCaller parameter, this function also prints the v parameters based on the format passed in the format parameter. Unlike InfoSkipCallerOptsf, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.InfoSkipCallerOptsfMS("%s, %s, %s, last is %s", 2, Options{}, "test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] subexample.go:239: **st, **ue, **2, last is ***99

func InfoSkipCallerf

func InfoSkipCallerf(format string, skipCaller int, v ...any)

InfoSkipCallerf is a function that logs informational messages based on the Options global variable, using the INFO level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike InfoSkipCaller, this function passes the format you want as a parameter, so the value passed will have an impact on the format of the printed message.

Usage Example:

logger.InfoSkipCallerf("%s, %s, %s, last is %s", 2, "test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] subexample.go:239: test, true, 112, last is 10.99

func InfoSkipCallerfH

func InfoSkipCallerfH(format string, skipCaller int, v ...any)

InfoSkipCallerfH is a function that writes informational messages based on the Options global variable, using the INFO level. The file name and the line information in the message will be based on the value of the skipCaller parameter, this function also prints the v parameters based on the format passed in the format parameter. Unlike InfoSkipCallerf, this function will hide all values passed as parameters v when printing the message.

Usage Example:

logger.InfoSkipCallerfH("%s, %s, %s, last is %s", 2, "test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] subexample.go:23: ****, ****, ***, last is *****

func InfoSkipCallerfME

func InfoSkipCallerfME(format string, skipCaller int, v ...any)

InfoSkipCallerfME is a function that writes informational messages based on the Options global variable, using the INFO level. The file name and the line information in the message will be based on the value of the skipCaller parameter, this function also prints the v parameters based on the format passed in the format parameter. Unlike InfoSkipCallerf, this function will mask the last half of all values passed as parameters v when printing the message.

Usage Example:

logger.InfoSkipCallerfME("%s, %s, %s, last is %s", 2, "test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] subexample.go:239: te**, tr**, 1**, last is 10***

func InfoSkipCallerfMS

func InfoSkipCallerfMS(format string, skipCaller int, v ...any)

InfoSkipCallerfMS is a function that writes informational messages based on the Options global variable, using the INFO level. The file name and the line information in the message will be based on the value of the skipCaller parameter, this function also prints the v parameters based on the format passed in the format parameter. Unlike InfoSkipCallerf, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.InfoSkipCallerfMS("%s, %s, %s, last is %s", 2, "test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] subexample.go:239: **st, **ue, **2, last is ***99

func Infof

func Infof(format string, v ...any)

Infof is a function that records informational messages based on the Options global variable, using the INFO level. Unlike Info, this function passes the format you want as a parameter, so the value passed will impact the format of the printed message.

Usage Example:

logger.Infof("%s, %s, %s, last is %s", "test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] example.go:239: test, true, 112, last is 10.99

func InfofH

func InfofH(format string, v ...any)

InfofH is a function that records informational messages based on the Options global variable, using the INFO level, printing the parameters v based on the format entered as a parameter. Unlike Infof, this function will hide all values passed as parameters v when printing the message.

Usage Example:

logger.InfofH("%s, %s, %s, last is %s", "test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] example.go:239: ****, ****, ***, last is *****

func InfofME

func InfofME(format string, v ...any)

InfofME is a function that records informational messages based on the Options global variable, using the INFO level, printing the parameters v based on the format entered as a parameter. Unlike Infof, this function will mask the last half of all values passed as parameters v when printing the message.

Usage Example:

logger.InfofME("%s, %s, %s, last is %s", "test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] example.go:239: te**, tr**, 1**, last is 10***

func InfofMS

func InfofMS(format string, v ...any)

InfofMS is a function that records informational messages based on the Options global variable, using the INFO level, printing the parameters v based on the format entered as a parameter. Unlike Infof, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.InfofMS("%s, %s, %s, last is %s", "test", true, 112, 10.99)

Result (default):

[INFO 2023/12/09 19:26:09] example.go:239: **st, **ue, **2, last is ***99

func RandomCustomPrefix added in v1.1.2

func RandomCustomPrefix() string

func RandomLevel added in v1.3.1

func RandomLevel() level

func RandomOut added in v1.3.1

func RandomOut() io.Writer

func ResetOptionsToDefault

func ResetOptionsToDefault()

ResetOptionsToDefault resets the global options to their default values. This function initializes the opts variable with a new instance of the Options struct, effectively resetting all options to their default values.

Example usage:

logger.ResetOptionsToDefault()

Return:

None

func SetOptions

func SetOptions(options *Options)

SetOptions sets the global options to the specified options pointer.

This function allows you to configure the behavior of the logging package by setting various options such as print mode, date format, asynchronous mode, etc.

Example usage:

logger.SetOptions(logger.Options{})

Parameters:

options - A pointer to an Options struct that contains the desired configuration options.

Note:

The Options struct contains the following fields:
- Mode: Print mode (default: ModeDefault)
- DateFormat: Argument date format (default: DateFormatFull24h)
- EnableAsynchronousMode: Enable asynchronous printing mode (default: false)
- UTC: Enable argument date to be UTC (default: false)
- DontPrintEmptyMessage: Enable to not print empty message (default: false)
- RemoveSpace: Enable to remove spaces between parameters (default: false)
- HideAllArgs: If true will hide all datetime and prefix arguments (default: false)
- HideArgDatetime: If true it will hide the datetime arguments (default: false)
- HideArgCaller: If true, it will hide the caller arguments (default: false)
- DisablePrefixColors: If true, it will disable all argument and prefix colors (default: false)
- EnableJsonMsgFieldForSlice: If true, json mode msg field becomes slice (default: false, only if Mode is ModeJson)
  IMPORTANT: If true, the format parameter will not work

Return:

None

func Warn added in v1.3.1

func Warn(v ...any)

Warn is a function that records informational messages based on the global Options variable, using the level WARN.

Usage Example:

logger.Warn("test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] example.go:239: test true 112 10.99

func WarnH added in v1.3.1

func WarnH(v ...any)

WarnH is a function that records informational messages based on the Options global variable, using the WARN level. Unlike Warn, this function will hide all values passed as parameters v when printing the message.

Usage Example:

logger.WarnH("test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] example.go:239: **** **** *** *****

func WarnME added in v1.3.1

func WarnME(v ...any)

WarnME is a function that records informational messages based on the Options global variable, using the WARN level. Unlike Warn, this function will mask the last half of all values passed as parameters v when printing the message.

Usage Example:

logger.WarnME("test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] example.go:239: te** tr** 1** 10***

func WarnMS added in v1.3.1

func WarnMS(v ...any)

WarnMS is a function that records informational messages based on the Options global variable, using the WARN level. Unlike Warn, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.WarnMS("test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] example.go:239: **st **ue **2 ***99

func WarnOpts added in v1.3.1

func WarnOpts(opts Options, v ...any)

WarnOpts is a function that records informational messages, using the WARN level. Unlike Warn, this function passes Options as a parameter, and it will only be persisted in that message, therefore, this Options passed as a parameter will not impact other flows using global Options.

Usage Example:

logger.WarnOpts(Options{}, "test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] example.go:239: test true 112 10.99

func WarnOptsH added in v1.3.1

func WarnOptsH(opts Options, v ...any)

WarnOptsH is a function that records informative messages based on the Options variable passed as a parameter, using the WARN level. Unlike WarnOpts, this function will hide all values passed as parameters v when printing the message.

Usage Example:

logger.WarnOptsH(Options{}, "test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] example.go:239: ****, ****, ***, *****

func WarnOptsME added in v1.3.1

func WarnOptsME(opts Options, v ...any)

WarnOptsME is a function that records informative messages based on the Options variable passed as a parameter, using the WARN level. Unlike WarnOpts, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.WarnOptsME(Options{}, "test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] example.go:239: te** tr** 1** 10***

func WarnOptsMS added in v1.3.1

func WarnOptsMS(opts Options, v ...any)

WarnOptsMS is a function that records informative messages based on the Options variable passed as a parameter, using the WARN level. Unlike WarnOpts, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.WarnOptsMS(Options{}, "test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] example.go:239: **st **ue **2 ***99

func WarnOptsf added in v1.3.1

func WarnOptsf(format string, opts Options, v ...any)

WarnOptsf is a function that records informational messages based on the Options variable passed as a parameter, using the WARN level. Unlike WarnOpts, this function passes the format you want as a parameter, so the value passed will impact the format of the printed message.

Usage Example:

logger.WarnOptsf("%s, %s, %s, last is %s", Options{}, "test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] example.go:239: test, true, 112, last is 10.99

func WarnOptsfH added in v1.3.1

func WarnOptsfH(format string, opts Options, v ...any)

WarnOptsfH is a function that records informational messages based on the Options variable passed as a parameter, using the WARN level, print the parameters v also based on the format entered as a parameter. Unlike WarnOptsf, this function will hide all values passed as parameters v when printing the message.

Usage Example:

logger.WarnOptsfH("%s, %s, %s, last is %s", Options{}, "test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] example.go:239: ****, ****, ***, last is *****

func WarnOptsfME added in v1.3.1

func WarnOptsfME(format string, opts Options, v ...any)

WarnOptsfME is a function that records informational messages based on the Options variable passed as a parameter, using the WARN level, print the parameters v also based on the format entered as a parameter. Unlike WarnOptsf, this function will mask the last half of all values passed as parameters v when printing the message.

Usage Example:

logger.WarnOptsfME("%s, %s, %s, last is %s", Options{}, "test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] example.go:239: te**, tr**, 1**, last is 10***

func WarnOptsfMS added in v1.3.1

func WarnOptsfMS(format string, opts Options, v ...any)

WarnOptsfMS is a function that records informational messages based on the Options variable passed as a parameter, using the WARN level, print the parameters v also based on the format entered as a parameter. Unlike WarnOptsf, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.WarnOptsfMS("%s, %s, %s, last is %s", Options{}, "test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] example.go:239: **st, **ue, **2, last is ***99

func WarnSkipCaller added in v1.3.1

func WarnSkipCaller(skipCaller int, v ...any)

WarnSkipCaller is a function that logs informational messages based on the Options global variable, using the WARN level. Unlike Warn, this function passes skipCaller as a parameter, therefore the value passed directly impacts the file name and line when printing the message.

Usage Example:

logger.WarnSkipCaller(2, "test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] subexample.go:139: te** tr** 1** 10***

func WarnSkipCallerH added in v1.3.1

func WarnSkipCallerH(skipCaller int, v ...any)

WarnSkipCallerH is a function that logs informational messages based on the Options global variable, using the WARN level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike WarnSkipCaller, this function will hide all values passed as parameters v when printing the message.

Usage Example:

logger.WarnSkipCallerH(2, "test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] subexample.go:239: ****, ****, ***, *****

func WarnSkipCallerME added in v1.3.1

func WarnSkipCallerME(skipCaller int, v ...any)

WarnSkipCallerME is a function that logs informational messages based on the Options global variable, using the WARN level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike WarnSkipCaller, this function will mask the last half of all values passed as parameters v when printing the message.

Usage Example:

logger.WarnSkipCallerME(2, "test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] example.go:239: te** tr** 1** 10***

func WarnSkipCallerMS added in v1.3.1

func WarnSkipCallerMS(skipCaller int, v ...any)

WarnSkipCallerMS is a function that logs informational messages based on the Options global variable, using the WARN level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike WarnSkipCaller, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.WarnSkipCallerMS(2, "test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] subexample.go:239: **st **ue **2 ***99

func WarnSkipCallerOpts added in v1.3.1

func WarnSkipCallerOpts(skipCaller int, opts Options, v ...any)

WarnSkipCallerOpts is a function that records informational messages, using the WARN level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike WarnSkipCaller, this function passes Options as a parameter, and it will only be persisted in that message, therefore, this Options passed as a parameter will not impact other flows using global Options.

Usage Example:

logger.WarnSkipCallerOpts(2, Options{}, "test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] subexample.go:239: test, true, 112, last is 10.99

func WarnSkipCallerOptsH added in v1.3.1

func WarnSkipCallerOptsH(skipCaller int, opts Options, v ...any)

WarnSkipCallerOptsH is a function that records informational messages based on the Options variable passed as a parameter, using the WARN level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike WarnSkipCallerOpts, this function will hide all values passed as parameters v when printing the message.

Usage Example:

logger.WarnSkipCallerOptsH(2, Options{}, "test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] subexample.go:23: **** **** *** *****

func WarnSkipCallerOptsME added in v1.3.1

func WarnSkipCallerOptsME(skipCaller int, opts Options, v ...any)

WarnSkipCallerOptsME is a function that records informational messages based on the Options variable passed as a parameter, using the WARN level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike WarnSkipCallerOpts, this function will mask the last half of all values passed as parameters v when printing the message.

Usage Example:

logger.WarnSkipCallerOptsME(2, Options{}, "test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] subexample.go:239: te** tr** 1** 10***

func WarnSkipCallerOptsMS added in v1.3.1

func WarnSkipCallerOptsMS(skipCaller int, opts Options, v ...any)

WarnSkipCallerOptsMS is a function that records informational messages based on the Options variable passed as a parameter, using the WARN level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike WarnSkipCallerOpts, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.WarnSkipCallerOptsMS(2, Options{}, "test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] subexample.go:239: **st **ue **2 ***99

func WarnSkipCallerOptsf added in v1.3.1

func WarnSkipCallerOptsf(format string, skipCaller int, opts Options, v ...any)

WarnSkipCallerOptsf is a function that records informational messages based on the Options variable passed as a parameter, using the WARN level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike WarnSkipCallerOpts, this function passes the format you want as a parameter, so the value passed will impact the format of the printed message.

Usage Example:

logger.WarnSkipCallerOptsf("%s, %s, %s, last is %s", 2, Options{}, "test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] subexample.go:239: test, true, 112, last is 10.99

func WarnSkipCallerOptsfH added in v1.3.1

func WarnSkipCallerOptsfH(format string, skipCaller int, opts Options, v ...any)

WarnSkipCallerOptsfH is a function that records informational messages based on the Options variable passed as a parameter, using the WARN level. The file name and line information in the message will be based on the value of the skipCaller parameter, this function also prints the v parameters based on the format passed in the format parameter. Unlike WarnSkipCallerOptsf, this function will mask the last half of all values passed as v settings when printing a message.

Usage Example:

logger.WarnSkipCallerOptsfH("%s, %s, %s, last is %s", 2, Options{}, "test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] subexample.go:23: ****, ****, ***, last is *****

func WarnSkipCallerOptsfME added in v1.3.1

func WarnSkipCallerOptsfME(format string, skipCaller int, opts Options, v ...any)

WarnSkipCallerOptsfME is a function that records informational messages based on the Options variable passed as a parameter, using the WARN level. The file name and line information in the message will be based on the value of the skipCaller parameter, this function also prints the v parameters based on the format passed in the format parameter. Unlike WarnSkipCallerOptsf, this function will mask the last half of all values passed as parameters v when printing the message.

Usage Example:

logger.WarnSkipCallerOptsfME("%s, %s, %s, last is %s", 2, Options{}, "test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] subexample.go:239: te**, tr**, 1**, last is 10***

func WarnSkipCallerOptsfMS added in v1.3.1

func WarnSkipCallerOptsfMS(format string, skipCaller int, opts Options, v ...any)

WarnSkipCallerOptsfMS is a function that records informational messages based on the Options variable passed as a parameter, using the WARN level. The file name and line information in the message will be based on the value of the skipCaller parameter, this function also prints the v parameters based on the format passed in the format parameter. Unlike WarnSkipCallerOptsf, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.WarnSkipCallerOptsfMS("%s, %s, %s, last is %s", 2, Options{}, "test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] subexample.go:239: **st, **ue, **2, last is ***99

func WarnSkipCallerf added in v1.3.1

func WarnSkipCallerf(format string, skipCaller int, v ...any)

WarnSkipCallerf is a function that logs informational messages based on the Options global variable, using the WARN level, the file name and line information in the message will be based on the value of the skipCaller parameter. Unlike WarnSkipCaller, this function passes the format you want as a parameter, so the value passed will have an impact on the format of the printed message.

Usage Example:

logger.WarnSkipCallerf("%s, %s, %s, last is %s", 2, "test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] subexample.go:239: test, true, 112, last is 10.99

func WarnSkipCallerfH added in v1.3.1

func WarnSkipCallerfH(format string, skipCaller int, v ...any)

WarnSkipCallerfH is a function that writes informational messages based on the Options global variable, using the WARN level. The file name and the line information in the message will be based on the value of the skipCaller parameter, this function also prints the v parameters based on the format passed in the format parameter. Unlike WarnSkipCallerf, this function will hide all values passed as parameters v when printing the message.

Usage Example:

logger.WarnSkipCallerfH("%s, %s, %s, last is %s", 2, "test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] subexample.go:23: ****, ****, ***, last is *****

func WarnSkipCallerfME added in v1.3.1

func WarnSkipCallerfME(format string, skipCaller int, v ...any)

WarnSkipCallerfME is a function that writes informational messages based on the Options global variable, using the WARN level. The file name and the line information in the message will be based on the value of the skipCaller parameter, this function also prints the v parameters based on the format passed in the format parameter. Unlike WarnSkipCallerf, this function will mask the last half of all values passed as parameters v when printing the message.

Usage Example:

logger.WarnSkipCallerfME("%s, %s, %s, last is %s", 2, "test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] subexample.go:239: te**, tr**, 1**, last is 10***

func WarnSkipCallerfMS added in v1.3.1

func WarnSkipCallerfMS(format string, skipCaller int, v ...any)

WarnSkipCallerfMS is a function that writes informational messages based on the Options global variable, using the WARN level. The file name and the line information in the message will be based on the value of the skipCaller parameter, this function also prints the v parameters based on the format passed in the format parameter. Unlike WarnSkipCallerf, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.WarnSkipCallerfMS("%s, %s, %s, last is %s", 2, "test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] subexample.go:239: **st, **ue, **2, last is ***99

func Warnf added in v1.3.1

func Warnf(format string, v ...any)

Warnf is a function that records informational messages based on the Options global variable, using the WARN level. Unlike Warn, this function passes the format you want as a parameter, so the value passed will impact the format of the printed message.

Usage Example:

logger.Warnf("%s, %s, %s, last is %s", "test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] example.go:239: test, true, 112, last is 10.99

func WarnfH added in v1.3.1

func WarnfH(format string, v ...any)

WarnfH is a function that records informational messages based on the Options global variable, using the WARN level, printing the parameters v based on the format entered as a parameter. Unlike Warnf, this function will hide all values passed as parameters v when printing the message.

Usage Example:

logger.WarnfH("%s, %s, %s, last is %s", "test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] example.go:239: ****, ****, ***, last is *****

func WarnfME added in v1.3.1

func WarnfME(format string, v ...any)

WarnfME is a function that records informational messages based on the Options global variable, using the WARN level, printing the parameters v based on the format entered as a parameter. Unlike Warnf, this function will mask the last half of all values passed as parameters v when printing the message.

Usage Example:

logger.WarnfME("%s, %s, %s, last is %s", "test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] example.go:239: te**, tr**, 1**, last is 10***

func WarnfMS added in v1.3.1

func WarnfMS(format string, v ...any)

WarnfMS is a function that records informational messages based on the Options global variable, using the WARN level, printing the parameters v based on the format entered as a parameter. Unlike Warnf, this function will mask the first half of all values passed as parameters v when printing the message.

Usage Example:

logger.WarnfMS("%s, %s, %s, last is %s", "test", true, 112, 10.99)

Result (default):

[WARN 2023/12/09 19:26:09] example.go:239: **st, **ue, **2, last is ***99

Types

type BaseEnum

type BaseEnum interface {
	// contains filtered or unexported methods
}

type DateFormat

type DateFormat string
const (
	DateFormatFull24h                    DateFormat = "2006/01/02 15:04:05"
	DateFormatFull12h                    DateFormat = "2006/01/02 3:04:05PM"
	DateFormatNormal                     DateFormat = "2006/01/02"
	DateFormatTime24h                    DateFormat = "15:04:05"
	DateFormatTime12h                    DateFormat = "3:04:05PM"
	DateFormatTextDate                   DateFormat = "January 2, 2006"
	DateFormatTextDatetime24h            DateFormat = "January 2, 2006 15:04:05"
	DateFormatTextDatetime12h            DateFormat = "January 2, 2006 3:04:05PM"
	DateFormatTextDateWithWeekday        DateFormat = "Monday, January 2, 2006"
	DateFormatTextDatetime24hWithWeekday DateFormat = "Monday, January 2, 2006 15:04:05"
	DateFormatTextDatetime12hWithWeekday DateFormat = "Monday, January 2, 2006 3:04:05PM"
	DateFormatAbbrTextDate               DateFormat = "Jan 2 Mon"
	DateFormatAbbrTextDatetime24h        DateFormat = "Jan 2 Mon 15:04:05"
	DateFormatAbbrTextDatetime12h        DateFormat = "Jan 2 Mon 3:04:05PM"
)

func RandomDateFormat

func RandomDateFormat() DateFormat

func (DateFormat) Format

func (d DateFormat) Format() string

type Mode

type Mode string
const (
	ModeDefault Mode = "DEFAULT"
	ModeJson    Mode = "JSON"
)

func RandomMode

func RandomMode() Mode

type Options

type Options struct {
	// Out represents an io.Writer that is used for the logging output.
	Out io.Writer
	// Level field represents the logging level. It is of type `level`.
	Level level
	// Print mode (default: ModeDefault)
	Mode Mode
	// Argument date format (default: DateFormatFull24h)
	DateFormat DateFormat
	// Custom prefix text
	CustomPrefixText string
	// Custom after prefix text
	CustomAfterPrefixText string
	// Enable asynchronous printing mode (default: false)
	EnableAsynchronousMode bool
	// Enable argument date to be UTC (default: false)
	UTC bool
	// Enable to not print empty message (default: false)
	DontPrintEmptyMessage bool
	// Enable to remove spaces between parameters (default: false)
	RemoveSpace bool
	// If true will hide all datetime and prefix arguments (default: false)
	HideAllArgs bool
	// If true it will hide the datetime arguments (default: false)
	HideArgDatetime bool
	// If true, it will hide the caller arguments (default: false)
	HideArgCaller bool
	// If true, it will disable all argument and prefix colors (default: false)
	DisablePrefixColors bool
	// If true, it will disable all message colors (default: false)
	DisableMessageColors bool
	// If true, json mode msg field becomes slice (default: false, only if Mode is ModeJson)
	//
	// IMPORTANT: If true, the format parameter will not work
	EnableJsonMsgFieldForSlice bool
}

func GetOptions added in v1.3.4

func GetOptions() Options

GetOptions returns the current global options configuration. This function retrieves the current configuration options for the logging package. The options include print mode, date format, asynchronous mode, etc. Return:

Options - The current global options configuration.

Jump to

Keyboard shortcuts

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