logging

package
v0.0.0-...-d0a9a3c Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCallStack

func GetCallStack() string

Types

type ExtensionLogger

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

ExtensionLogger exposes logging capabilities to the extension It automatically appends time stamps and debug level to each message and ensures all logs are placed in the logs folder passed by the agent TODO: eventually we need to support cycling of logs to prevent filling up the disk

func New

New creates a new logging instance. If the handlerEnvironment is nil, we'll use a standard output logger

func (*ExtensionLogger) Close

func (logger *ExtensionLogger) Close()

Close closes the file

func (*ExtensionLogger) Error

func (logger *ExtensionLogger) Error(format string, v ...interface{})

Error logs an error. Format is the same as fmt.Print

func (*ExtensionLogger) ErrorFromStream

func (logger *ExtensionLogger) ErrorFromStream(prefix string, streamReader io.Reader)

Error logs an error. Get the message from a stream directly

func (*ExtensionLogger) Info

func (logger *ExtensionLogger) Info(format string, v ...interface{})

Info logs an information statement. Format is the same as fmt.Print

func (*ExtensionLogger) InfoFromStream

func (logger *ExtensionLogger) InfoFromStream(prefix string, streamReader io.Reader)

Info logs an information statement. Get the message from a stream directly

func (*ExtensionLogger) Warn

func (logger *ExtensionLogger) Warn(format string, v ...interface{})

Warn logs a warning. Format is the same as fmt.Print

func (*ExtensionLogger) WarnFromStream

func (logger *ExtensionLogger) WarnFromStream(prefix string, streamReader io.Reader)

Warn logs a warning. Get the message from a stream directly

Jump to

Keyboard shortcuts

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