Documentation
¶
Index ¶
- Variables
- func Critf(format string, vars ...interface{})
- func Critln(msg ...interface{})
- func Debugf(format string, vars ...interface{})
- func Debugln(msg ...interface{})
- func Flush() chan bool
- func Infof(format string, vars ...interface{})
- func Infoln(msg ...interface{})
- func JSONCritf(format string, vars ...interface{}) *jsonmessage.JSONMessage
- func JSONCritln(msg ...interface{}) *jsonmessage.JSONMessage
- func JSONDebugf(format string, vars ...interface{}) *jsonmessage.JSONMessage
- func JSONDebugln(msg ...interface{}) *jsonmessage.JSONMessage
- func JSONInfof(format string, vars ...interface{}) *jsonmessage.JSONMessage
- func JSONInfoln(msg ...interface{}) *jsonmessage.JSONMessage
- func JSONLoggerAddDecoration(decoration map[string]interface{})
- func JSONLoggerAddMutator(m jsonprinter.Mutator)
- func JSONLoggerEnableDebugLogging(toggle bool)
- func JSONLoggerEnableHumanTimestamps(toggle bool)
- func JSONLoggerEnablePrettyPrint(toggle bool)
- func JSONWarnf(format string, vars ...interface{}) *jsonmessage.JSONMessage
- func JSONWarnln(msg ...interface{}) *jsonmessage.JSONMessage
- func LineLoggerEnableDebugLogging(toggle bool)
- func SendJSON(msg *jsonmessage.JSONMessage)
- func Warnf(format string, vars ...interface{})
- func Warnln(msg ...interface{})
Constants ¶
This section is empty.
Variables ¶
var ( // DefaultLineLogger is a logger that you can just call upon when you start your application. DefaultLineLogger lineprinter.DebugLineLogger // DefaultJSONLogger is a logger that you can just call upon when you start your application. DefaultJSONLogger jsonprinter.DebugJSONLogger // DefaultLineLoggerBuffer holds how many lines the line buffer will hold onto before it starts to drop // or slow down the application. DefaultLineLoggerBuffer = 500 // DefaultJSONLoggerBuffer holds how many json messages the line buffer will hold onto before it starts to drop // or slow down the application. DefaultJSONLoggerBuffer = 500 )
Functions ¶
func Flush ¶
func Flush() chan bool
Flush on the package will stop the default logging engines that you have made use of. It will close the channel once all logging engines have flushed everything and stopped.
func JSONCritf ¶
func JSONCritf(format string, vars ...interface{}) *jsonmessage.JSONMessage
JSONCritf is a shortcut function that will give you a JSON Message that is populated with time, level and your message ready to be shipped. It can still be decorated with more keys if needed.
func JSONCritln ¶
func JSONCritln(msg ...interface{}) *jsonmessage.JSONMessage
JSONCritln is a shortcut function that will give you a JSON Message that is populated with time, level and your message ready to be shipped. It can still be decorated with more keys if needed.
func JSONDebugf ¶
func JSONDebugf(format string, vars ...interface{}) *jsonmessage.JSONMessage
JSONDebugf is a shortcut function that will give you a JSON Message that is populated with time, level and your message ready to be shipped. It can still be decorated with more keys if needed.
func JSONDebugln ¶
func JSONDebugln(msg ...interface{}) *jsonmessage.JSONMessage
JSONDebugln is a shortcut function that will give you a JSON Message that is populated with time, level and your message ready to be shipped. It can still be decorated with more keys if needed.
func JSONInfof ¶
func JSONInfof(format string, vars ...interface{}) *jsonmessage.JSONMessage
JSONInfof is a shortcut function that will give you a JSON Message that is populated with time, level and your message ready to be shipped. It can still be decorated with more keys if needed.
func JSONInfoln ¶
func JSONInfoln(msg ...interface{}) *jsonmessage.JSONMessage
JSONInfoln is a shortcut function that will give you a JSON Message that is populated with time, level and your message ready to be shipped. It can still be decorated with more keys if needed.
func JSONLoggerAddDecoration ¶ added in v0.3.0
func JSONLoggerAddDecoration(decoration map[string]interface{})
JSONLoggerAddDecoration starts the default JSON logger if not already started then adds the supplied decoration to the list.
func JSONLoggerAddMutator ¶ added in v0.3.0
func JSONLoggerAddMutator(m jsonprinter.Mutator)
JSONLoggerAddMutator starts the default JSON logger if not already started then adds the supplied mutator to the list.
func JSONLoggerEnableDebugLogging ¶
func JSONLoggerEnableDebugLogging(toggle bool)
JSONLoggerEnableDebugLogging Starts the default JSON logger if not already started then enabled debug logging.
func JSONLoggerEnableHumanTimestamps ¶ added in v0.3.0
func JSONLoggerEnableHumanTimestamps(toggle bool)
JSONLoggerEnableHumanTimestamps starts the default JSON logger if not already started then enabled human timestamping requests on future logs
func JSONLoggerEnablePrettyPrint ¶
func JSONLoggerEnablePrettyPrint(toggle bool)
JSONLoggerEnablePrettyPrint starts the default JSON logger if not already started then enabled debug logging
func JSONWarnf ¶
func JSONWarnf(format string, vars ...interface{}) *jsonmessage.JSONMessage
JSONWarnf is a shortcut function that will give you a JSON Message that is populated with time, level and your message ready to be shipped. It can still be decorated with more keys if needed.
func JSONWarnln ¶
func JSONWarnln(msg ...interface{}) *jsonmessage.JSONMessage
JSONWarnln is a shortcut function that will give you a JSON Message that is populated with time, level and your message ready to be shipped. It can still be decorated with more keys if needed.
func LineLoggerEnableDebugLogging ¶
func LineLoggerEnableDebugLogging(toggle bool)
func SendJSON ¶
func SendJSON(msg *jsonmessage.JSONMessage)
SendJSON is used to send a JSON message to the default JSON logger.
Types ¶
This section is empty.
