appixLogger

package
v0.0.0-...-4e1b13b Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// LevelError is the error level
	LevelError = "error"
	// LevelInfo is the info level
	LevelInfo = "info"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppixLogger

type AppixLogger interface {
	AddMessageToQueue(notification LoggerNotification)
}

AppixLogger defines the core set of logging calls, to be used by other components

type Logger

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

Logger : The structure of the logger singleton

func NewAppixLogger

func NewAppixLogger(url string) *Logger

NewAppixLogger : create a new instance of Logger if doesn't exist already. Otherwise return the actual instance

func (*Logger) AddMessageToQueue

func (l *Logger) AddMessageToQueue(notification LoggerNotification)

AddMessageToQueue : Add a new LoggerNotification object to the Queue and print on stdout the message

func (*Logger) Start

func (l *Logger) Start()

Start : launch to go routine watching at the queue

func (*Logger) Stop

func (l *Logger) Stop()

Stop : kill the logger routine

type LoggerNotification

type LoggerNotification struct {
	Message  string
	LogEvent string
	Level    string
}

LoggerNotification : The structure describing a notification to log

Jump to

Keyboard shortcuts

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