Documentation
¶
Overview ¶
Package name declaration
Index ¶
- Constants
- func InterfacesToString(raw_slice ...interface{}) string
- func Stack() string
- type Info
- type Logger
- func (l *Logger) Critical(messages ...interface{})
- func (l *Logger) CriticalF(format string, a ...interface{})
- func (l *Logger) CriticalNF(n int, format string, a ...interface{})
- func (l *Logger) Debug(messages ...interface{})
- func (l *Logger) DebugF(format string, a ...interface{})
- func (l *Logger) DebugNF(n int, format string, a ...interface{})
- func (l *Logger) Error(messages ...interface{})
- func (l *Logger) ErrorF(format string, a ...interface{})
- func (l *Logger) ErrorNF(n int, format string, a ...interface{})
- func (l *Logger) Fatal(messages ...interface{})
- func (l *Logger) FatalF(format string, a ...interface{})
- func (l *Logger) FatalNF(n int, format string, a ...interface{})
- func (l *Logger) Info(messages ...interface{})
- func (l *Logger) InfoF(format string, a ...interface{})
- func (l *Logger) InfoNF(n int, format string, a ...interface{})
- func (l *Logger) Log(lvl string, message interface{})
- func (l *Logger) Notice(messages ...interface{})
- func (l *Logger) NoticeF(format string, a ...interface{})
- func (l *Logger) NoticeNF(n int, format string, a ...interface{})
- func (l *Logger) Panic(messages ...interface{})
- func (l *Logger) PanicF(format string, a ...interface{})
- func (l *Logger) PanicNF(n int, format string, a ...interface{})
- func (l *Logger) StackAsCritical(messages interface{})
- func (l *Logger) StackAsDebug(messages interface{})
- func (l *Logger) StackAsError(messages interface{})
- func (l *Logger) Warning(messages ...interface{})
- func (l *Logger) WarningF(format string, a ...interface{})
- func (l *Logger) WarningNF(n int, format string, a ...interface{})
- type Worker
Constants ¶
const ( Black = (iota + 30) Red Green Yellow Blue Magenta Cyan White )
Color numbers for stdout
Variables ¶
This section is empty.
Functions ¶
func InterfacesToString ¶
func InterfacesToString(raw_slice ...interface{}) string
Types ¶
type Info ¶
type Info struct { Id uint64 GID uint64 Time string Module string Level string Line int Filename string Message string // contains filtered or unexported fields }
Info class, Contains all the info on what has to logged, time is the current time, Module is the specific module For which we are logging, level is the state, importance and type of message logged, Message contains the string to be logged, format is the format of string to be passed to sprintf
type Logger ¶
type Logger struct { Module string Levels map[string]bool // contains filtered or unexported fields }
Logger class that is an interface to user to log messages, Module is the module for which we are testing worker is variable of Worker class that is used in bottom layers to log the message
func New ¶
Returns a new instance of logger class, module is the specific module for which we are logging , color defines whether the output is to be colored or not, out is instance of type io.Writer defaults to os.Stderr
func (*Logger) Critical ¶
func (l *Logger) Critical(messages ...interface{})
Critical logs a message at a Critical Level
func (*Logger) CriticalF ¶
CriticalF logs a message at Critical level using the same syntax and options as fmt.Printf
func (*Logger) CriticalNF ¶
CriticalNF is just like CriticalF, but the n parameter indicates how many stack levels to go back when printing file name and line number info
func (*Logger) Debug ¶
func (l *Logger) Debug(messages ...interface{})
Debug logs a message at Debug level
func (*Logger) DebugF ¶
DebugF logs a message at Debug level using the same syntax and options as fmt.Printf
func (*Logger) DebugNF ¶
DebugNF is just like DebugF, but the n parameter indicates how many stack levels to go back when printing file name and line number info
func (*Logger) Error ¶
func (l *Logger) Error(messages ...interface{})
Error logs a message at Error level
func (*Logger) ErrorF ¶
ErrorF logs a message at Error level using the same syntax and options as fmt.Printf
func (*Logger) ErrorNF ¶
ErrorNF is just like ErrorF, but the n parameter indicates how many stack levels to go back when printing file name and line number info
func (*Logger) Fatal ¶
func (l *Logger) Fatal(messages ...interface{})
Fatal is just like func l.Critical logger except that it is followed by exit to program
func (*Logger) FatalF ¶
FatalF is just like func l.CriticalF logger except that it is followed by exit to program
func (*Logger) FatalNF ¶
FatalNF is just like FatalF, but the n parameter indicates how many stack levels to go back when printing file name and line number info
func (*Logger) Info ¶
func (l *Logger) Info(messages ...interface{})
Info logs a message at Info level
func (*Logger) InfoF ¶
InfoF logs a message at Info level using the same syntax and options as fmt.Printf
func (*Logger) InfoNF ¶
InfoNF is just like InfoF, but the n parameter indicates how many stack levels to go back when printing file name and line number info
func (*Logger) Log ¶
The log commnand is the function available to user to log message, lvl specifies the degree of the messagethe user wants to log, message is the info user wants to log
func (*Logger) Notice ¶
func (l *Logger) Notice(messages ...interface{})
Notice logs a message at Notice level
func (*Logger) NoticeF ¶
NoticeF logs a message at Notice level using the same syntax and options as fmt.Printf
func (*Logger) NoticeNF ¶
NoticeNF is just like NoticeF, but the n parameter indicates how many stack levels to go back when printing file name and line number info
func (*Logger) Panic ¶
func (l *Logger) Panic(messages ...interface{})
Panic is just like func l.Critical except that it is followed by a call to panic
func (*Logger) PanicF ¶
PanicF is just like func l.CriticalF except that it is followed by a call to panic
func (*Logger) PanicNF ¶
PanicNF is just like PanicF, but the n parameter indicates how many stack levels to go back when printing file name and line number info
func (*Logger) StackAsCritical ¶
func (l *Logger) StackAsCritical(messages interface{})
Prints this goroutine's execution stack as critical with an optional message at the begining
func (*Logger) StackAsDebug ¶
func (l *Logger) StackAsDebug(messages interface{})
Prints this goroutine's execution stack as debug with an optional message at the begining
func (*Logger) StackAsError ¶
func (l *Logger) StackAsError(messages interface{})
Prints this goroutine's execution stack as an error with an optional message at the begining
func (*Logger) Warning ¶
func (l *Logger) Warning(messages ...interface{})
Warning logs a message at Warning level
type Worker ¶
Worker class, Worker is a log object used to log messages and Color specifies if colored output is to be produced