plunderlogging

package module
v0.0.0-...-58306fc Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileLogger

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

FileLogger allows parlay to log output to a file on the local filesystem

type JSONLog

type JSONLog struct {
	State   string         `json:"state"`
	Entries []JSONLogEntry `json:"entries"`
}

JSONLog contains all of the output from a parlay execution

type JSONLogEntry

type JSONLogEntry struct {
	Created  time.Time `json:"created"`
	TaskName string    `json:"task"`
	Err      string    `json:"error"`
	Entry    string    `json:"entry"`
}

JSONLogEntry contains the details a specific action

type JSONLogger

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

JSONLogger allows parlay to log output to an in-memory jsonStruct

type Logger

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

Logger - is a stuct that manages the verious types of logger available

func (*Logger) DeleteLogs

func (l *Logger) DeleteLogs(target string) error

DeleteLogs - will remove logs for a particular target

func (*Logger) EnableFileLogging

func (l *Logger) EnableFileLogging(e bool)

EnableFileLogging - will enable logging to a file

func (*Logger) EnableJSONLogging

func (l *Logger) EnableJSONLogging(e bool)

EnableJSONLogging - will enable logging through JSON

func (*Logger) GetJSONLogs

func (l *Logger) GetJSONLogs(target string) (*JSONLog, error)

GetJSONLogs - returns a pointer to the current JSON Logs

func (*Logger) InitJSON

func (l *Logger) InitJSON()

InitJSON - will start/initialise the JSON logging functionality

func (*Logger) InitLogFile

func (l *Logger) InitLogFile(path string) error

InitLogFile - will initialise file based logging

func (*Logger) SetLoggingState

func (l *Logger) SetLoggingState(target, state string)

SetLoggingState - currently a NOOP (TODO)

func (*Logger) WriteLogEntry

func (l *Logger) WriteLogEntry(target, task, entry, err string)

WriteLogEntry will capture what is transpiring and where

Jump to

Keyboard shortcuts

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