logger

package
v0.0.0-...-c25eef7 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package logger implements a basic logger to support the core level of output and a verbose mode, and maybe some color in future.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Basic

type Basic struct {
	UseColor bool
	Verbose  bool
}

Basic is a basic logger to provide the simple functionality to allow people to run vrsn in verbose mode and disable/enable color support.

func NewBasic

func NewBasic(color bool, verbose bool) Basic

NewBasic creates an instance of the Basic logger.

func (Basic) Debug

func (b Basic) Debug(msg string)

Debug is a log that will only be displayed if the `vrsn` command is run in verbose mode.

func (Basic) Debugf

func (b Basic) Debugf(msg string, args ...interface{})

Debugf is a log that will only be displayed if the `vrsn` command is run in verbose mode, with support for variables.

func (Basic) Info

func (b Basic) Info(msg string)

Info is an info level log which will be default always be displayed.

func (Basic) Infof

func (b Basic) Infof(msg string, args ...interface{})

Infof is an info level log which will be default always be displayed with support for variables.

Jump to

Keyboard shortcuts

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