log

package
Version: v0.0.0-...-f999dd2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2018 License: MIT Imports: 4 Imported by: 3

Documentation

Overview

Package log provides provides a minimal interface for structured logging

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetFile

func GetFile(name string) (*os.File, error)

GetFile opens a file in read/write to append data to it

Types

type Logger

type Logger interface {
	Debug(keyvals ...interface{})
	Info(keyvals ...interface{})
	Error(keyvals ...interface{})
	Warn(keyvals ...interface{})
	Crit(keyvals ...interface{})

	With(keyvals ...interface{}) Logger
}

Logger provides provides a minimal interface for structured logging It supplies leveled logging function which create a log event from keyvals, a variadic sequence of alternating keys and values.

func NewJSONLogger

func NewJSONLogger(fle string) Logger

NewJSONLogger returns a Json Logger

func NewLogfmtLogger

func NewLogfmtLogger(fle string) Logger

NewLogfmtLogger returns a LogfmtLogger Logger

Source Files

Jump to

Keyboard shortcuts

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