log

package
v0.9.15 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 1, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyGlobalLoggerForContext added in v0.9.8

func CopyGlobalLoggerForContext() insolar.Logger

func Debug

func Debug(args ...interface{})

func Debugf added in v0.2.0

func Debugf(format string, args ...interface{})

func Error

func Error(args ...interface{})

func Errorf added in v0.2.0

func Errorf(format string, args ...interface{})

func Event added in v0.9.8

func Event(level insolar.LogLevel, args ...interface{})

func Eventf added in v0.9.8

func Eventf(level insolar.LogLevel, format string, args ...interface{})

func Fatal added in v0.2.0

func Fatal(args ...interface{})

func Fatalf added in v0.2.0

func Fatalf(format string, args ...interface{})

func Flush added in v0.9.8

func Flush()

func GetGlobalLevelFilter added in v0.9.8

func GetGlobalLevelFilter() insolar.LogLevel

func GlobalLogger added in v0.6.0

func GlobalLogger() insolar.Logger

func Info

func Info(args ...interface{})

func Infof added in v0.2.0

func Infof(format string, args ...interface{})

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 NewLogExt added in v0.9.8

func NewLogExt(cfg configuration.Log, skipFrameBaselineAdjustment int8) (insolar.Logger, error)

NewLog creates logger instance with particular configuration

func NewLoglevelChangeHandler added in v0.9.0

func NewLoglevelChangeHandler() http.Handler

ServeHTTP is an HTTP handler that changes the global minimum log level

func Panic

func Panic(args ...interface{})

func Panicf added in v0.2.0

func Panicf(format string, args ...interface{})

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 SetGlobalLevelFilter(level insolar.LogLevel) error

func SetGlobalLogger added in v0.7.5

func SetGlobalLogger(logger insolar.Logger)

func SetLevel

func SetLevel(level string) error

SetLevel lets log level for global logger

func SetLogLevel added in v0.9.8

func SetLogLevel(level insolar.LogLevel)

func Warn

func Warn(args ...interface{})

func Warnf added in v0.2.0

func Warnf(format string, args ...interface{})

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL