log

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2021 License: GPL-3.0 Imports: 5 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package log is a substitute for the global apex/log that is not thread safe.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Fields

type Fields = log.Fields

Fields re-exports log.Fields from github.com/apex/log.

type Interface

type Interface interface {
	log.Interface
	SetColorMode(v bool)
	SetDebug(v bool)
	SetPadding(v int)
}

Interface is an extension of log.Interface.

type Log

type Log struct {
	log.Logger
	// contains filtered or unexported fields
}

Log is a thread-safe wrapper for log.Logger.

func New

func New() *Log

New creates a new Log instance.

func (*Log) SetColorMode

func (l *Log) SetColorMode(v bool)

SetColorMode sets the global color mode for the logger.

func (*Log) SetDebug

func (l *Log) SetDebug(v bool)

SetDebug sets the log level to Debug or Info.

func (*Log) SetPadding

func (l *Log) SetPadding(v int)

SetPadding sets the padding of the log handler in a thread-safe way.

Jump to

Keyboard shortcuts

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