log

package
v0.0.0-...-404ccd1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package log provides the both file and console (general) logging capabilities to libonomy modules such as app and identity.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

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

Debug prints formatted debug level log message.

func DebugMode

func DebugMode(mode bool)

DebugMode sets log debug level

func Error

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

Error prints formatted error level log message.

func Info

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

Info prints formatted info level log message.

func InitlibonomyLoggingSystem

func InitlibonomyLoggingSystem(dataFolderPath string, logFileName string)

InitlibonomyLoggingSystem initializes app logging system.

func PrettyID

func PrettyID(id string) string

PrettyID formats ID.

func Warning

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

Warning prints formatted warning level log message.

Types

type Log

type Log struct {
	*logging.Logger
}

Log is an exported type that embeds our logger. logging library can be replaced as long as it implements same functionality used across the project.

var AppLog Log

smlogger is the local app singleton logger.

func New

func New(module string, dataFolderPath string, logFileName string) Log

New creates a logger for a module. e.g. p2p instance logger.

Jump to

Keyboard shortcuts

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