lgr

package
v1.4.1 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package lgr An instance of library logger, used for direct output from the command line, etc.

To change logger level shou use the system environment "UYMAS_LGR_LEVEL", like:

//window powershell
$env:UYMAS_LGR_LEVEL='all'

// linux shell
export UYMAS_LGR_LEVEL=all

if not info by default.

Index

Examples

Constants

View Source
const (
	// EnvLevelKey try set the lgr level by system environment, like `$ export EnvLevelKey=info`
	EnvLevelKey = "UYMAS_LGR_LEVEL"
)

Variables

This section is empty.

Functions

func Debug

func Debug(message string, args ...any)
Example
Debug("This is Debug logger.")
Output:

func Error

func Error(message string, args ...any)
Example
Error("This is Debug logger.")
Output:

func Info

func Info(message string, args ...any)

func Log

func Log() logger.Logger

func Trace added in v1.4.0

func Trace(message string, args ...any)

func Warn

func Warn(message string, args ...any)

Types

This section is empty.

Jump to

Keyboard shortcuts

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