lowger

package module
v0.0.0-...-3efde89 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2016 License: MIT Imports: 4 Imported by: 2

README

lowger

Simple pluggable logger for Golang

How to use?

Simply import github.com/JesusIslam/lowger and it will provide Fatal, Error, Warning, and Info methods.

How to add my own plugin?

Just do lowger.AddPlugin(YOUR_PLUGIN_HERE) where your plugin must implement Logger interface.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Plugins []Logger

Functions

func AddPlugin

func AddPlugin(l Logger) int

func Error

func Error(messages ...interface{})

func Fatal

func Fatal(messages ...interface{})

func Info

func Info(messages ...interface{})

func RemovePlugin

func RemovePlugin(idx int)

func Warning

func Warning(messages ...interface{})

Types

type ConsoleLogger

type ConsoleLogger struct{}

func (*ConsoleLogger) Error

func (c *ConsoleLogger) Error(messages ...interface{})

func (*ConsoleLogger) Fatal

func (c *ConsoleLogger) Fatal(messages ...interface{})

func (*ConsoleLogger) Info

func (c *ConsoleLogger) Info(messages ...interface{})

func (*ConsoleLogger) Warning

func (c *ConsoleLogger) Warning(messages ...interface{})

type Logger

type Logger interface {
	Error(messages ...interface{})
	Warning(messages ...interface{})
	Info(messages ...interface{})
	Fatal(messages ...interface{})
}

Jump to

Keyboard shortcuts

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