log

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2019 License: MIT Imports: 4 Imported by: 1

Documentation

Overview

Package log provides logging support for the application and framework developers

Index

Constants

View Source
const DebugLog = 10 // Debug log for the developer's application, separate from the goradd framework debug log
View Source
const ErrorLog = 4 // Should be sent to sysop immediately
View Source
const FrameworkDebugLog = 1 // Should only exist when debugging style logs are required for debugging the goradd framework itself.
View Source
const InfoLog = 2 // Info log is designed to always exist. These would be messages we only need to check periodically to know the system is working correctly.
View Source
const WarningLog = 3 // Should be sent to sysop periodically (daily perhaps?). Would generally be issues involving low resources.

Variables

View Source
var Loggers = map[int]LoggerI{}

Functions

func CreateDefaultLoggers

func CreateDefaultLoggers()

Create's default loggers for the application. After calling this, you can replace the loggers with your own, and add additional loggers to the logging array.

func Debug

func Debug(v ...interface{})

Debug is for application debugging logging

func Debugf

func Debugf(format string, v ...interface{})

func Error

func Error(v ...interface{})

func Errorf

func Errorf(format string, v ...interface{})

func FrameworkDebug

func FrameworkDebug(v ...interface{})

func FrameworkDebugf

func FrameworkDebugf(format string, v ...interface{})

func HasLogger

func HasLogger(id int) bool

func Info

func Info(v ...interface{})

func Infof

func Infof(format string, v ...interface{})

func Print

func Print(logType int, v ...interface{})

func Printf

func Printf(logType int, format string, v ...interface{})

func Warning

func Warning(v ...interface{})

func Warningf

func Warningf(format string, v ...interface{})

Types

type EmailLogger

type EmailLogger struct {
	StandardLogger
	EmailAddresses []string
}

func (EmailLogger) Log

func (l EmailLogger) Log(out string)

type LoggerI

type LoggerI interface {
	Log(err string)
}

type StandardLogger

type StandardLogger struct {
	*log.Logger
}

func (StandardLogger) Log

func (l StandardLogger) Log(out string)

Jump to

Keyboard shortcuts

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