logger

package
v1.18.0-RC10 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 4 Imported by: 3

Documentation

Overview

Provides a simple logger for the SDK.

Index

Constants

View Source
const (
	NONE  = 0
	FATAL = 1
	ERROR = 2
	INFO  = 3
	DEBUG = 4
)

Variables

This section is empty.

Functions

func SyncLoggers

func SyncLoggers(loggers []*Logger)

SyncLoggers syncs the loggers prefixes

  • loggers is the list of loggers to sync

Types

type Logger

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

Log global logger instance

func (*Logger) Close

func (l *Logger) Close()

func (*Logger) Debug

func (l *Logger) Debug(v ...interface{})

func (*Logger) Error

func (l *Logger) Error(v ...interface{})

func (*Logger) Fatal

func (l *Logger) Fatal(v ...interface{})

func (*Logger) Info

func (l *Logger) Info(v ...interface{})

func (*Logger) Init

func (l *Logger) Init(lvl int, prefix string)

Init - Initialize logging

func (*Logger) SetLevel

func (l *Logger) SetLevel(lvl int)

SetLevel - Configures the log level. Higher the number more verbose.

func (*Logger) SetLogFile

func (l *Logger) SetLogFile(logFile io.Writer, verbose bool)

SetLogFile - Writes log to the file. set verbose false disables log to os.Stderr

Jump to

Keyboard shortcuts

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