Documentation ¶
Overview ¶
******************************************************************************
- Copyright 2017 Dell Inc. *
- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
- in compliance with the License. You may obtain a copy of the License at *
- http://www.apache.org/licenses/LICENSE-2.0 *
- Unless required by applicable law or agreed to in writing, software distributed under the License
- is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- or implied. See the License for the specific language governing permissions and limitations under
- the License. ******************************************************************************
Index ¶
- Constants
- Variables
- func IsValidLogLevel(l string) bool
- type EdgeXLogger
- func (lc EdgeXLogger) Debug(msg string, labels ...string) error
- func (lc EdgeXLogger) Error(msg string, labels ...string) error
- func (lc EdgeXLogger) Info(msg string, labels ...string) error
- func (lc EdgeXLogger) SetLogLevel(logLevel string) error
- func (lc EdgeXLogger) Trace(msg string, labels ...string) error
- func (lc EdgeXLogger) Warn(msg string, labels ...string) error
- type LoggingClient
- type MockLogger
- func (lc MockLogger) Debug(msg string, labels ...string) error
- func (lc MockLogger) Error(msg string, labels ...string) error
- func (lc MockLogger) Info(msg string, labels ...string) error
- func (lc MockLogger) SetLogLevel(loglevel string) error
- func (lc MockLogger) Trace(msg string, labels ...string) error
- func (lc MockLogger) Warn(msg string, labels ...string) error
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, labels ...string) error
Log a DEBUG level message
func (EdgeXLogger) Error ¶
func (lc EdgeXLogger) Error(msg string, labels ...string) error
Log an ERROR level message
func (EdgeXLogger) Info ¶
func (lc EdgeXLogger) Info(msg string, labels ...string) error
Log an INFO level message
func (EdgeXLogger) SetLogLevel ¶
func (lc EdgeXLogger) SetLogLevel(logLevel string) error
SetLogLevel sets minimum severity log level
type LoggingClient ¶
type LoggingClient interface { SetLogLevel(logLevel string) error Debug(msg string, labels ...string) error Error(msg string, labels ...string) error Info(msg string, labels ...string) error Trace(msg string, labels ...string) error Warn(msg string, labels ...string) error }
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) SetLogLevel ¶
func (lc MockLogger) SetLogLevel(loglevel string) error
Click to show internal directories.
Click to hide internal directories.