logger

package
v0.0.0-...-a5a6d41 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package logger provides multi-level log functionality

Index

Constants

View Source
const (
	// Svr1 defines severity level 1, highest level.
	Svr1 = severity("Fatal ")
	// Svr2 defines severity level 2, medium level.
	Svr2 = severity("Error ")
	// Svr3 defines severity level 3, low level.
	Svr3 = severity("Warning ")
	// Svr4 defines severity level 4, Info.
	Svr4 = severity("Info ")
	// Svr5 defines severity level 5, Debug.
	Svr5 = severity("Debug ")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

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

Log handles all the dependencies for logger

func New

func New(types []string) Log

New returns an instance of Log with all the dependencies initialized

func (Log) Debug

func (l Log) Debug(data ...interface{})

Debug prints log of severity 5

func (Log) Error

func (l Log) Error(data ...interface{})

Error prints log of severity 2

func (Log) Fatal

func (l Log) Fatal(data ...interface{})

Fatal prints log of severity 1

func (Log) Info

func (l Log) Info(data ...interface{})

Info prints logs of severity 4

func (Log) Warn

func (l Log) Warn(data ...interface{})

Warn prints log of severity 3

type Service

type Service interface {
	Debug(data ...interface{})
	Info(data ...interface{})
	Warn(data ...interface{})
	Error(data ...interface{})
	Fatal(data ...interface{})
}

Service defines all the logging methods to be implemented

Jump to

Keyboard shortcuts

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