logger

package
v3.3.5 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

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

func New

func New(dir string, perms os.FileMode) *Logger

New creates new logger for CLI

func (*Logger) Add

func (l *Logger) Add(name string) error

Add creates new sub-logger for given name

func (*Logger) Flush

func (l *Logger) Flush()

Flush writes buffered data to file

func (*Logger) Get

func (l *Logger) Get(name string) *SubLogger

Get returns sub-logger with given name

type SubLogger

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

func (*SubLogger) Print

func (l *SubLogger) Print(f string, a ...interface{})

Print writes message to log file

Jump to

Keyboard shortcuts

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