log

package
v0.0.21 Latest Latest
Warning

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

Go to latest
Published: May 1, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package log contains logging functions

Package log contains logging functions

Package log contains logging functions

Index

Constants

View Source
const (
	// TTYFormat represents a tty logger
	TTYFormat string = "tty"
)

Variables

View Source
var (

	// InfoLevel is the json level for information
	InfoLevel = "info"
	// WarningLevel is the json level for warning
	WarningLevel = "warn"
	// ErrorLevel is the json level for error
	ErrorLevel = "error"
)

Functions

func Debugf

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

Debugf writes a debug-level log with a format

func Infof

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

Infof writes a info-level log with a format

func Init

func Init(level logrus.Level)

Init configures the logger for the package to use.

func SetLevel

func SetLevel(level string)

SetLevel sets the level of the main logger

func SetOutputFormat

func SetOutputFormat(format string)

SetOutputFormat sets the output format

func Successf

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

Successf prints a message with the success symbol first, and the text in green

Types

type ClarkezoneWriter

type ClarkezoneWriter interface {
	Debugf(format string, args ...interface{})
	Infof(format string, args ...interface{})
	Successf(format string, args ...interface{})
}

ClarkezoneWriter implements the interface of the writers

type TTYWriter

type TTYWriter struct {
	// contains filtered or unexported fields
}

TTYWriter writes into a tty terminal

func (*TTYWriter) Debugf

func (*TTYWriter) Debugf(format string, args ...interface{})

Debugf writes a debug-level log with a format

func (*TTYWriter) Fprintf

func (w *TTYWriter) Fprintf(writer io.Writer, format string, a ...interface{})

Fprintf prints a line with format

func (*TTYWriter) Infof

func (*TTYWriter) Infof(format string, args ...interface{})

Infof writes a info-level log with a format

func (*TTYWriter) Successf

func (w *TTYWriter) Successf(format string, args ...interface{})

Successf prints a message with the success symbol first, and the text in green

Jump to

Keyboard shortcuts

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