logger

package
v2.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2020 License: Apache-2.0 Imports: 5 Imported by: 6

Documentation

Index

Constants

View Source
const (
	BodyIndent   = "    "
	HeaderIndent = "  "
)

Variables

This section is empty.

Functions

func PrettyIdentity

func PrettyIdentity(v Identifiable) string

PrettyIdentity formats a standard pretty identity of a type.

Types

type Identifiable

type Identifiable interface {
	// Identity is the method that returns the required name and optional description that make up identity.
	Identity() (name string, description string)
}

Identifiable is an interface that indicates that a type has an identity.

type Logger

type Logger struct {
	logger.Logger
}

Logger is an extension to libbuildpack.Logger to add additional functionality.

func (Logger) Body

func (l Logger) Body(format string, args ...interface{})

Body prints the log message with each line indented four spaces.

func (Logger) BodyError

func (l Logger) BodyError(format string, args ...interface{})

BodyError prints the log message colored red and bold with each line indented four spaces.

func (Logger) BodyIndent

func (l Logger) BodyIndent(format string, args ...interface{}) string

BodyIndent indents each line of a log message to the BodyIndent offset.

func (Logger) BodyWarning

func (l Logger) BodyWarning(format string, args ...interface{})

BodyWarning prints the log message colored yellow and bold with each line indented four spaces.

func (Logger) Header

func (l Logger) Header(format string, args ...interface{})

Header prints the log message indented two spaces, with an empty line above it.

func (Logger) HeaderError

func (l Logger) HeaderError(format string, args ...interface{})

HeaderError prints the log message colored red and bold, indented two spaces, with an empty line above it.

func (Logger) HeaderWarning

func (l Logger) HeaderWarning(format string, args ...interface{})

HeaderWarning prints the log message colored yellow and bold, indented two spaces, with an empty line above it.

func (Logger) LaunchConfiguration

func (l Logger) LaunchConfiguration(format string, defaultValue string)

func (Logger) TerminalError

func (l Logger) TerminalError(v Identifiable, format string, args ...interface{})

Terminal error prints the build description colored red and bold, flush left, with an empty line above it, followed by the log message message red and bold, and indented two spaces.

func (Logger) Title

func (l Logger) Title(v Identifiable)

Title prints the buildpack description flush left, with an empty line above it.

Jump to

Keyboard shortcuts

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