Documentation
¶
Overview ¶
Package log contains adapter for third-party loggers
Example:
package main
import ( "github.com/insolar/insolar/configuration" "github.com/insolar/insolar/log" ) func main() { // global logger log.SetLevel("Debug") log.Debugln("debug log message") // local logger logger, _ := log.NewLog(configuration.Log{Level: "Warning", Adapter: "logrus"}) logger.Warnln("warning log message") }
Index ¶
- func Debug(args ...interface{})
- func Debugln(args ...interface{})
- func Error(args ...interface{})
- func Errorln(args ...interface{})
- func Info(args ...interface{})
- func Infoln(args ...interface{})
- func NewLog(cfg configuration.Log) (core.Logger, error)
- func Panic(args ...interface{})
- func Panicln(args ...interface{})
- func SetLevel(level string) error
- func Warn(args ...interface{})
- func Warnln(args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Debug ¶
func Debug(args ...interface{})
Debug logs a message at level Debug to the global logger.
func Debugln ¶
func Debugln(args ...interface{})
Debugln logs a message at level Debug to the global logger.
func Error ¶
func Error(args ...interface{})
Error logs a message at level Error to the global logger.
func Errorln ¶
func Errorln(args ...interface{})
Errorln logs a message at level Error to the global logger.
func Infoln ¶
func Infoln(args ...interface{})
Infoln logs a message at level Info to the global logger.
func NewLog ¶
func NewLog(cfg configuration.Log) (core.Logger, error)
NewLog creates logger instance with particular configuration
func Panic ¶
func Panic(args ...interface{})
Panic logs a message at level Panic to the global logger.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.