Skip to content
logger package provides log.Logger adapters
Go Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd/example
.gitignore
.travis.yml
LICENSE
README.md
changelog.md
example_test.go
go.mod
go.sum
logger.go
logger_test.go
onchange.sh
qa_test.go

README.md

Build Status codecov

logger - package provides log.Logger adapters

Quick start

go get github.com/gregoryv/logger

Use in your code

type Car struct {
    logger.Logger
}

car := &Car{logger.New()}
car.Log("brakes are failing")
car.Logf("reached speed limit %s", 100)

or when testing the logger can be replaced by testing.T

func Test_car_speed(t *testing.T) {
    car := &Car{t}
    // asserts here
}
You can’t perform that action at this time.