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 event")
// local logger
logger, _ := log.NewLog(configuration.Log{Level: "Warning", Adapter: "logrus"})
logger.Warnln("warning log event")
}
Index ¶
- func Debug(args ...interface{})
- func Debugf(format string, args ...interface{})
- func Debugln(args ...interface{})
- func Error(args ...interface{})
- func Errorf(format string, args ...interface{})
- func Errorln(args ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(format string, args ...interface{})
- func Fatalln(args ...interface{})
- func GetLevel() string
- func Info(args ...interface{})
- func Infof(format string, args ...interface{})
- func Infoln(args ...interface{})
- func NewLog(cfg configuration.Log) (core.Logger, error)
- func Panic(args ...interface{})
- func Panicf(format string, args ...interface{})
- func Panicln(args ...interface{})
- func SetLevel(level string) error
- func SetOutput(w io.Writer)
- func Warn(args ...interface{})
- func Warnf(format string, 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 event at level Debug to the global logger.
func Debugf ¶ added in v0.2.0
func Debugf(format string, args ...interface{})
Debugf logs a event at level Debug to the global logger.
func Debugln ¶
func Debugln(args ...interface{})
Debugln logs a event at level Debug to the global logger.
func Error ¶
func Error(args ...interface{})
Error logs a event at level Error to the global logger.
func Errorf ¶ added in v0.2.0
func Errorf(format string, args ...interface{})
Errorf logs a event at level Error to the global logger.
func Errorln ¶
func Errorln(args ...interface{})
Errorln logs a event at level Error to the global logger.
func Fatal ¶ added in v0.2.0
func Fatal(args ...interface{})
Fatal logs a event at level Fatal to the global logger.
func Fatalf ¶ added in v0.2.0
func Fatalf(format string, args ...interface{})
Fatalf logs a event at level Fatal to the global logger.
func Fatalln ¶ added in v0.2.0
func Fatalln(args ...interface{})
Fatalln logs a event at level Fatal to the global logger.
func Infof ¶ added in v0.2.0
func Infof(format string, args ...interface{})
Infof logs a event at level Info to the global logger.
func Infoln ¶
func Infoln(args ...interface{})
Infoln logs a event 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 event at level Panic to the global logger.
func Panicf ¶ added in v0.2.0
func Panicf(format string, args ...interface{})
Panicf logs a event at level Panic to the global logger.
func Panicln ¶
func Panicln(args ...interface{})
Panicln logs a event at level Panic to the global logger.
Types ¶
This section is empty.