std

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Level

type Level int

Level enumerates available log levels.

const (
	LevelError Level = iota
	LevelWarning
	LevelInfo
	LevelDebug
	LevelTrace
)

Log levels.

func (Level) String

func (l Level) String() string

String implements Stringer interface.

type Log

type Log struct {
	// contains filtered or unexported fields
}

Log implements the Logger interface by using standard golang logger.

func New

func New(in *log.Logger, lvl Level) *Log

New creates a Logger interface implementation.

func (*Log) Debug

func (l *Log) Debug(args ...interface{})

Debug prints a log message with "debug" log level.

func (*Log) Debugf

func (l *Log) Debugf(format string, args ...interface{})

Debugf prints a log message with "debug" log level and specified format.

func (*Log) Error

func (l *Log) Error(args ...interface{})

Error prints a log message with "error" log level.

func (*Log) Errorf

func (l *Log) Errorf(format string, args ...interface{})

Errorf prints a log message with "error" log level and specified format.

func (*Log) Info

func (l *Log) Info(args ...interface{})

Info prints a log message with "info" log level.

func (*Log) Infof

func (l *Log) Infof(format string, args ...interface{})

Infof prints a log message with "info" log level and specified format.

func (*Log) Print

func (l *Log) Print(lvl Level, args ...interface{})

Print prints log message with a specified level.

func (*Log) Printf

func (l *Log) Printf(lvl Level, format string, args ...interface{})

Printf prints log message with a specified level and format.

func (*Log) Set

func (l *Log) Set(fields ...glog.Field)

Set updates logger's additional fields.

func (*Log) SetLevel

func (l *Log) SetLevel(lvl Level) *Log

SetLevel updates log level.

func (*Log) Trace

func (l *Log) Trace(args ...interface{})

Trace prints a log message with "trace" log level.

func (*Log) Tracef

func (l *Log) Tracef(format string, args ...interface{})

Tracef prints a log message with "trace" log level and specified format.

func (*Log) Warning

func (l *Log) Warning(args ...interface{})

Warning prints a log message with "warning" log level.

func (*Log) Warningf

func (l *Log) Warningf(format string, args ...interface{})

Warningf prints a log message with "warning" log level and specified format.

func (*Log) With

func (l *Log) With(fields ...glog.Field) glog.Logger

With returns a copy of the logger with additional fields.

Jump to

Keyboard shortcuts

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