logger

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package logger provides different log levels by wrapping the default log.Logger. There are four levels, in decreasing order of priority: Error, Warning, Info, and Debug. Error and Warning write to os.Stderr and Info and Debug write to os.Stdout. If Debug is set as the default level, all logs include file and line number data.

The package can be configured with two environment variables:

CARTESI_LOG_LEVEL: defines the main log level. Info is the default. CARTESI_LOG_ENABLE_TIMESTAMP: a flag that adds date and time information to the log entries. It is disabled by default.

Index

Constants

This section is empty.

Variables

View Source
var (
	Error   *log.Logger
	Warning *log.Logger
	Info    *log.Logger
	Debug   *log.Logger
)

Functions

func Init

func Init(logLevel string, enableTimestamp bool)

Types

This section is empty.

Jump to

Keyboard shortcuts

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