logging

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const ExtraPadding = DefaultInitialPadding * 2

ExtraPadding is the double of the DefaultInitialPadding.

Variables

This section is empty.

Functions

func Log

func Log(title string, next middleware.Action, padding Padding) middleware.Action

Log pretty prints the given action and its title. You can have different padding levels by providing different initial paddings. The middleware will print the title in the given padding and the action logs in padding+default padding. The default padding in the log library is 3. The middleware always resets to the default padding.

Types

type Padding

type Padding int

Padding is a logging initial padding.

const DefaultInitialPadding Padding = 3

DefaultInitialPadding is the default padding in the log library.

Jump to

Keyboard shortcuts

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