fx: go.uber.org/fx/internal/fxlog Index | Files | Directories

package fxlog

import "go.uber.org/fx/internal/fxlog"

Index

Package Files

fxlog.go spy.go

type Logger Uses

type Logger struct {
    Printer
}

A Logger writes output to standard error.

func New Uses

func New() *Logger

New returns a new Logger backed by the standard library's log package.

func (*Logger) Fatalf Uses

func (l *Logger) Fatalf(format string, v ...interface{})

Fatalf logs an Fx line then fatals.

func (*Logger) Panic Uses

func (l *Logger) Panic(err error)

Panic logs an Fx line then panics.

func (*Logger) PrintProvide Uses

func (l *Logger) PrintProvide(t interface{})

PrintProvide logs a type provided into the dig.Container.

func (*Logger) PrintSignal Uses

func (l *Logger) PrintSignal(signal os.Signal)

PrintSignal logs an os.Signal.

func (*Logger) Printf Uses

func (l *Logger) Printf(format string, v ...interface{})

Printf logs a formatted Fx line.

type Printer Uses

type Printer interface {
    Printf(string, ...interface{})
}

Printer is a formatting printer.

type Spy Uses

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

Spy is an Fx Printer that captures logged statements. It may be used in tests of Fx logs.

func (*Spy) Messages Uses

func (s *Spy) Messages() []string

Messages returns a copy of all captured messages.

func (*Spy) Printf Uses

func (s *Spy) Printf(msg string, args ...interface{})

Printf logs the given message, formatting it in printf-style.

func (*Spy) Reset Uses

func (s *Spy) Reset()

Reset clears all messages from the Spy.

func (*Spy) String Uses

func (s *Spy) String() string

String returns all logged messages as a single newline-delimited string.

Directories

PathSynopsis
foovendor

Package fxlog imports 5 packages (graph) and is imported by 3 packages. Updated 2020-01-08. Refresh now. Tools for package owners.