logger

package
v0.0.0-...-0eb6aec Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2017 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Overview

Package logger provides a single logger for use by various GopherCI packages.

It's designed to hide a single concrete logger from the various packages, it's not designed to provide many logger alternatives to be swapped.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger interface {
	// Debug level for developer concerned debugging, not visible in production.
	Debug(args ...interface{})
	Debugf(format string, args ...interface{})

	// Info logs general events.
	Info(args ...interface{})
	Infof(format string, args ...interface{})

	// Error logs, errors. An error should only be logged once.
	Error(args ...interface{})
	Errorf(format string, args ...interface{})

	// Fatal logs an error and then immediately terminates execution.
	Fatal(args ...interface{})
	Fatalf(format string, args ...interface{})

	// With adds context to a logger.
	With(name string, value interface{}) Logger
}

Logger is a service to write structured, levelled logs with context.

func New

func New(out io.Writer, build, env, sentryDSN string) Logger

New constructs a new Logger.

func Testing

func Testing() Logger

Testing returns a logger for use in tests.

Jump to

Keyboard shortcuts

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