lesqllog

package
v0.24.4 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RandStringRunes added in v0.24.0

func RandStringRunes(n int) string

Types

type Logger

type Logger struct {
	Level          string
	LogFile        string
	LogToFile      bool
	LogEntry       string
	StartTs        time.Time
	EndTs          time.Time
	AferoFs        *afero.Afero
	JobDecorations jobDecorations
	JobCount       int
}

func New

func New() *Logger

New creates new logger instance

func (*Logger) DeactivateLogFile

func (logger *Logger) DeactivateLogFile()

DeactivateLogFile deactivates logfile

func (*Logger) Debug

func (logger *Logger) Debug(args ...interface{})

func (*Logger) Fatal

func (logger *Logger) Fatal(project string, args ...interface{})

Fatal prints error message and exists with exitcode 1

func (*Logger) FatalJob added in v0.23.0

func (logger *Logger) FatalJob(project string, jobID string, args ...interface{})

func (*Logger) Print

func (logger *Logger) Print(args ...interface{})

func (*Logger) PrintImportant

func (logger *Logger) PrintImportant(args ...interface{})

func (*Logger) PrintImportantJob added in v0.23.0

func (logger *Logger) PrintImportantJob(jobID string, args ...interface{})

func (*Logger) PrintJob added in v0.23.0

func (logger *Logger) PrintJob(jobID string, args ...interface{})

func (*Logger) Println

func (logger *Logger) Println(args ...interface{})

func (*Logger) PrintlnJob added in v0.23.0

func (logger *Logger) PrintlnJob(jobID string, args ...interface{})

func (*Logger) SetLevel

func (logger *Logger) SetLevel(lvl string) error

SetLevel sets logging level

func (*Logger) SetLogEntry

func (logger *Logger) SetLogEntry(logentry string) error

SetLogEntry sets the format of each log entry. It is a go text/template

func (*Logger) SetLogFile

func (logger *Logger) SetLogFile(logfile string) error

SetLogFile sets

func (*Logger) SqlDebug

func (logger *Logger) SqlDebug(jobID string, sql string, name string)

func (*Logger) Success

func (logger *Logger) Success(project string, message interface{})

Success prints success message and exists with exitcode 0

func (*Logger) Warningln

func (logger *Logger) Warningln(args ...interface{})

func (*Logger) WarninglnJob added in v0.23.0

func (logger *Logger) WarninglnJob(jobID string, args ...interface{})

Jump to

Keyboard shortcuts

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