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: "zerolog"}) logger.Warnln("warning log message") }
Index ¶
- func CopyGlobalLoggerForContext() insolar.Logger
- func Debug(args ...interface{})
- func Debugf(format string, args ...interface{})
- func Error(args ...interface{})
- func Errorf(format string, args ...interface{})
- func Event(level insolar.LogLevel, args ...interface{})
- func Eventf(level insolar.LogLevel, format string, args ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(format string, args ...interface{})
- func Flush()
- func GetGlobalLevelFilter() insolar.LogLevel
- func GlobalLogger() insolar.Logger
- func Info(args ...interface{})
- func Infof(format string, args ...interface{})
- func InitTicker()
- func NewLog(cfg configuration.Log) (insolar.Logger, error)
- func NewLogExt(cfg configuration.Log, skipFrameBaselineAdjustment int8) (insolar.Logger, error)
- func NewLoglevelChangeHandler() http.Handler
- func Panic(args ...interface{})
- func Panicf(format string, args ...interface{})
- func SaveGlobalLogger() func()
- func SaveGlobalLoggerAndFilter(includeFilter bool) func()
- func SetGlobalLevelFilter(level insolar.LogLevel) error
- func SetGlobalLogger(logger insolar.Logger)
- func SetLevel(level string) error
- func SetLogLevel(level insolar.LogLevel)
- func Warn(args ...interface{})
- func Warnf(format string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyGlobalLoggerForContext ¶ added in v0.9.8
func GetGlobalLevelFilter ¶ added in v0.9.8
func GlobalLogger ¶ added in v0.6.0
func InitTicker ¶ added in v0.9.2
func InitTicker()
func NewLog ¶
func NewLog(cfg configuration.Log) (insolar.Logger, error)
NewLog creates logger instance with particular configuration
func NewLoglevelChangeHandler ¶ added in v0.9.0
ServeHTTP is an HTTP handler that changes the global minimum log level
func SaveGlobalLogger ¶ added in v0.9.8
func SaveGlobalLogger() func()
func SaveGlobalLoggerAndFilter ¶ added in v0.9.8
func SaveGlobalLoggerAndFilter(includeFilter bool) func()
func SetGlobalLevelFilter ¶ added in v0.9.8
func SetGlobalLogger ¶ added in v0.7.5
func SetLogLevel ¶ added in v0.9.8
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.