Documentation ¶
Index ¶
- Constants
- Variables
- func IsValidLogLevel(l string) bool
- type EdgeXLogger
- func (lc EdgeXLogger) Debug(msg string, args ...interface{})
- func (lc EdgeXLogger) Error(msg string, args ...interface{})
- func (lc EdgeXLogger) Info(msg string, args ...interface{})
- func (lc EdgeXLogger) SetLogLevel(logLevel string) error
- func (lc EdgeXLogger) Trace(msg string, args ...interface{})
- func (lc EdgeXLogger) Warn(msg string, args ...interface{})
- type LoggingClient
- type MockLogger
- func (lc MockLogger) Debug(msg string, args ...interface{})
- func (lc MockLogger) Error(msg string, args ...interface{})
- func (lc MockLogger) Info(msg string, args ...interface{})
- func (lc MockLogger) SetLogLevel(loglevel string) error
- func (lc MockLogger) Trace(msg string, args ...interface{})
- func (lc MockLogger) Warn(msg string, args ...interface{})
Constants ¶
View Source
const ( TraceLog = "TRACE" DebugLog = "DEBUG" InfoLog = "INFO" WarnLog = "WARN" ErrorLog = "ERROR" )
These constants identify the log levels in order of increasing severity.
Variables ¶
Functions ¶
func IsValidLogLevel ¶
IsValidLogLevel checks if is a valid log level
Types ¶
type EdgeXLogger ¶
type EdgeXLogger struct {
// contains filtered or unexported fields
}
func (EdgeXLogger) Debug ¶
func (lc EdgeXLogger) Debug(msg string, args ...interface{})
Log a DEBUG level message
func (EdgeXLogger) Error ¶
func (lc EdgeXLogger) Error(msg string, args ...interface{})
Log an ERROR level message
func (EdgeXLogger) Info ¶
func (lc EdgeXLogger) Info(msg string, args ...interface{})
Log an INFO level message
func (EdgeXLogger) SetLogLevel ¶
func (lc EdgeXLogger) SetLogLevel(logLevel string) error
SetLogLevel sets minimum severity log level
func (EdgeXLogger) Trace ¶
func (lc EdgeXLogger) Trace(msg string, args ...interface{})
Log a TRACE level message
func (EdgeXLogger) Warn ¶
func (lc EdgeXLogger) Warn(msg string, args ...interface{})
Log a WARN level message
type LoggingClient ¶
type LoggingClient interface { SetLogLevel(logLevel string) error Debug(msg string, args ...interface{}) Error(msg string, args ...interface{}) Info(msg string, args ...interface{}) Trace(msg string, args ...interface{}) Warn(msg string, args ...interface{}) }
func NewClient ¶
func NewClient(owningServiceName string, isRemote bool, logTarget string, logLevel string) LoggingClient
Create a new logging client for the owning service
func NewMockClient ¶
func NewMockClient() LoggingClient
type MockLogger ¶
type MockLogger struct { }
func (MockLogger) Debug ¶
func (lc MockLogger) Debug(msg string, args ...interface{})
func (MockLogger) Error ¶
func (lc MockLogger) Error(msg string, args ...interface{})
func (MockLogger) Info ¶
func (lc MockLogger) Info(msg string, args ...interface{})
func (MockLogger) SetLogLevel ¶
func (lc MockLogger) SetLogLevel(loglevel string) error
func (MockLogger) Trace ¶
func (lc MockLogger) Trace(msg string, args ...interface{})
func (MockLogger) Warn ¶
func (lc MockLogger) Warn(msg string, args ...interface{})
Click to show internal directories.
Click to hide internal directories.