Documentation
¶
Index ¶
- Constants
- func Write(message string)
- func WriteDebug(message interface{})
- func WriteError(message interface{})
- func WriteInfo(message interface{})
- func WriteWarn(message interface{})
- type Message
- func (m *Message) Debug(msg ...interface{})
- func (m *Message) DestroyInstance()
- func (m *Message) Error(msg ...interface{})
- func (m *Message) Info(msg ...interface{})
- func (m *Message) SetLogLevel(l int)
- func (m *Message) Warn(msg ...interface{})
- func (m *Message) WriteCh(msg ...interface{})
- func (m *Message) WriteChDebug(msg ...interface{})
- func (m *Message) WriteChError(msg ...interface{})
- func (m *Message) WriteChInfo(msg ...interface{})
- func (m *Message) WriteChWarn(msg ...interface{})
Constants ¶
const DEBUG int = 3
const ERROR int = 2
const INFO int = 0
Constants definitions
const WARN int = 1
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Message ¶
type Message struct { // where to write messages Writer io.Writer // contains filtered or unexported fields }
Message struct Message its an object which contains all the atributes to manage the message writes into channel
func GetInstance ¶
GetInstance: return an instance of the object Message. If no instance has been created, a new one is created
func (*Message) Debug ¶
func (m *Message) Debug(msg ...interface{})
Debug write debug messages to logger
func (*Message) DestroyInstance ¶
func (m *Message) DestroyInstance()
DestroyInstance method stops the printMachine
func (*Message) Error ¶
func (m *Message) Error(msg ...interface{})
Error write error messages to logger
func (*Message) Info ¶
func (m *Message) Info(msg ...interface{})
Info write info messages to logger
func (*Message) SetLogLevel ¶
SetLogLevel method set the loglevel to the gived one
func (*Message) Warn ¶
func (m *Message) Warn(msg ...interface{})
Warn write warning messages to logger
func (*Message) WriteCh ¶
func (m *Message) WriteCh(msg ...interface{})
WriteCh always send a message to be written
func (*Message) WriteChDebug ¶
func (m *Message) WriteChDebug(msg ...interface{})
WriteChDebug send a message to be written by printMachine if the loglevel is greater or equal to debug
func (*Message) WriteChError ¶
func (m *Message) WriteChError(msg ...interface{})
WriteChError send a message to be written by printMachine if the loglevel is greater or equal to error
func (*Message) WriteChInfo ¶
func (m *Message) WriteChInfo(msg ...interface{})
WriteChInfo send a message to be written by printMachine if the loglevel is greater or equal to info
func (*Message) WriteChWarn ¶
func (m *Message) WriteChWarn(msg ...interface{})
WriteChWarn send a message to be written by printMachine if the loglevel is greater or equal to warn