stlog

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2024 License: BSD-2-Clause Imports: 3 Imported by: 4

Documentation

Overview

Package stlog adds log levels on top of the log facility in the standard library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(format string, v ...interface{})

Debug prints debug messages to the currently active logger when permitted by the log level. Input can be formatted according to fmt.Printf.

func Error

func Error(format string, v ...interface{})

Error prints error messages to the currently active logger when permitted by the log level. Input can be formatted according to fmt.Printf.

func Info

func Info(format string, v ...interface{})

Info prints info messages to the currently active logger when permitted by the log level. Input can be formatted according to fmt.Printf.

func SetLevel

func SetLevel(level LogLevel)

SetLevel sets the logging level.

func Warn

func Warn(format string, v ...interface{})

Warn prints waring messages to the currently active logger when permitted by the log level. Input can be formatted according to fmt.Printf.

Types

type LogLevel

type LogLevel int
const (
	ErrorLevel LogLevel = iota
	WarnLevel
	InfoLevel
	DebugLevel
)

func Level

func Level() LogLevel

GetLevel return the log level set.

Jump to

Keyboard shortcuts

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