Documentation ¶
Index ¶
- Constants
- type Info
- type Logger
- func (l *Logger) Critical(message string)
- func (l *Logger) Debug(message string)
- func (l *Logger) Error(message string)
- func (l *Logger) Fatal(message string)
- func (l *Logger) Info(message string)
- func (l *Logger) Log(lvl string, message string)
- func (l *Logger) Notice(message string)
- func (l *Logger) Panic(message string)
- func (l *Logger) Warning(message string)
- type Worker
Constants ¶
const ( Black = (iota + 30) Red Green Yellow Blue Magenta Cyan White )
Color numbers for stdout
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Info ¶
type Info struct { Id uint64 Time string Module string Level 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 // 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 NewLogger ¶
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) Fatal ¶
Fatal is just like func l,Cr.tical logger except that it is followed by exit to program
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
type Worker ¶
Worker class, Worker is a log object used to log messages and Color specifies if colored output is to be produced