log

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2018 License: Apache-2.0 Imports: 8 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: "logrus"})
	logger.Warnln("warning log message")
}

Index

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 Info

func Info(args ...interface{})

Info logs a message at level Info 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.

func Panicln

func Panicln(args ...interface{})

Panicln logs a message at level Panic to the global logger.

func SetLevel

func SetLevel(level string) error

SetLevel lets log level for global logger

func Warn

func Warn(args ...interface{})

Warn logs a message at level Warn to the global logger.

func Warnln

func Warnln(args ...interface{})

Warnln logs a message at level Warn to the global logger.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳