Documentation ¶
Overview ¶
Copyright (c) Microsoft Corporation. Licensed under the MIT License.
Index ¶
- func GetCallStack() string
- type ExtensionLogger
- func (logger *ExtensionLogger) Close()
- func (logger *ExtensionLogger) Error(format string, v ...interface{})
- func (logger *ExtensionLogger) ErrorFromStream(prefix string, streamReader io.Reader)
- func (logger *ExtensionLogger) Info(format string, v ...interface{})
- func (logger *ExtensionLogger) InfoFromStream(prefix string, streamReader io.Reader)
- func (logger *ExtensionLogger) Warn(format string, v ...interface{})
- func (logger *ExtensionLogger) WarnFromStream(prefix string, streamReader io.Reader)
- type ILogger
- type StreamLogReader
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
func New ¶
func New(he *handlerenv.HandlerEnvironment) *ExtensionLogger
New creates a new logging instance. If the handlerEnvironment is nil, we'll use a standard output logger
func NewWithName ¶
func NewWithName(he *handlerenv.HandlerEnvironment, logFileFormat string) *ExtensionLogger
Allows the caller to specify their own name for the file Supports cycling of logs to prevent filling up the disk
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