backend

package
v1.7.8 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StdOut represents os.Stdout
	StdOut = "std_out"
	// StdErr represents os.StdErr
	StdErr = "std_err"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DBLogger

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

DBLogger is an implementation of logger.Interface. It outputs logs to PGSql.

func NewDBLogger

func NewDBLogger(key string, level string, depth int) (*DBLogger, error)

NewDBLogger crates a new DB logger nil might be returned

func (*DBLogger) Close

func (dbl *DBLogger) Close() error

Close the opened io stream and flush data into DB Implements logger.Closer interface

func (*DBLogger) Debug

func (dbl *DBLogger) Debug(v ...interface{})

Debug ...

func (*DBLogger) Debugf

func (dbl *DBLogger) Debugf(format string, v ...interface{})

Debugf with format

func (*DBLogger) Error

func (dbl *DBLogger) Error(v ...interface{})

Error ...

func (*DBLogger) Errorf

func (dbl *DBLogger) Errorf(format string, v ...interface{})

Errorf with format

func (*DBLogger) Fatal

func (dbl *DBLogger) Fatal(v ...interface{})

Fatal error

func (*DBLogger) Fatalf

func (dbl *DBLogger) Fatalf(format string, v ...interface{})

Fatalf error

func (*DBLogger) Info

func (dbl *DBLogger) Info(v ...interface{})

Info ...

func (*DBLogger) Infof

func (dbl *DBLogger) Infof(format string, v ...interface{})

Infof with format

func (*DBLogger) Warning

func (dbl *DBLogger) Warning(v ...interface{})

Warning ...

func (*DBLogger) Warningf

func (dbl *DBLogger) Warningf(format string, v ...interface{})

Warningf with format

type FileLogger

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

FileLogger is an implementation of logger.Interface. It outputs logs to the specified logfile.

func NewFileLogger

func NewFileLogger(level string, logPath string, depth int) (*FileLogger, error)

NewFileLogger crates a new file logger nil might be returned

func (*FileLogger) Close

func (fl *FileLogger) Close() error

Close the opened io stream Implements logger.Closer interface

func (*FileLogger) Debug

func (fl *FileLogger) Debug(v ...interface{})

Debug ...

func (*FileLogger) Debugf

func (fl *FileLogger) Debugf(format string, v ...interface{})

Debugf with format

func (*FileLogger) Error

func (fl *FileLogger) Error(v ...interface{})

Error ...

func (*FileLogger) Errorf

func (fl *FileLogger) Errorf(format string, v ...interface{})

Errorf with format

func (*FileLogger) Fatal

func (fl *FileLogger) Fatal(v ...interface{})

Fatal error

func (*FileLogger) Fatalf

func (fl *FileLogger) Fatalf(format string, v ...interface{})

Fatalf error

func (*FileLogger) Info

func (fl *FileLogger) Info(v ...interface{})

Info ...

func (*FileLogger) Infof

func (fl *FileLogger) Infof(format string, v ...interface{})

Infof with format

func (*FileLogger) Warning

func (fl *FileLogger) Warning(v ...interface{})

Warning ...

func (*FileLogger) Warningf

func (fl *FileLogger) Warningf(format string, v ...interface{})

Warningf with format

type StdOutputLogger

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

StdOutputLogger is an implementation of logger.Interface. It outputs the log to the stdout/stderr.

func NewStdOutputLogger

func NewStdOutputLogger(level string, output string, depth int) *StdOutputLogger

NewStdOutputLogger creates a new std output logger

func (*StdOutputLogger) Debug

func (sl *StdOutputLogger) Debug(v ...interface{})

Debug ...

func (*StdOutputLogger) Debugf

func (sl *StdOutputLogger) Debugf(format string, v ...interface{})

Debugf with format

func (*StdOutputLogger) Error

func (sl *StdOutputLogger) Error(v ...interface{})

Error ...

func (*StdOutputLogger) Errorf

func (sl *StdOutputLogger) Errorf(format string, v ...interface{})

Errorf with format

func (*StdOutputLogger) Fatal

func (sl *StdOutputLogger) Fatal(v ...interface{})

Fatal error

func (*StdOutputLogger) Fatalf

func (sl *StdOutputLogger) Fatalf(format string, v ...interface{})

Fatalf error

func (*StdOutputLogger) Info

func (sl *StdOutputLogger) Info(v ...interface{})

Info ...

func (*StdOutputLogger) Infof

func (sl *StdOutputLogger) Infof(format string, v ...interface{})

Infof with format

func (*StdOutputLogger) Warning

func (sl *StdOutputLogger) Warning(v ...interface{})

Warning ...

func (*StdOutputLogger) Warningf

func (sl *StdOutputLogger) Warningf(format string, v ...interface{})

Warningf with format

Jump to

Keyboard shortcuts

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