Documentation ¶
Overview ¶
Copyright (c) 2019-2020, AT&T Intellectual Property. All rights reserved.
SPDX-License-Identifier: LGPL-2.1-only
Index ¶
- Constants
- func CurrentLogStatus() string
- func FormatCommitOrValErrors(err error) string
- func FormatConfigPathError(err error) error
- func FormatConfigPathErrorMultiline(err error) error
- func FormatRpcPathError(err error) error
- func FormatWarnings(warns []error) error
- func LoggingIsEnabledAtLevel(level LogLevel, logType LogType) bool
- func LoggingValueAndStatus(logType LogType) (int, bool)
- func MapLogLevelToName(level LogLevel) string
- func MapLogTypeToName(logType LogType) string
- func SetConfigDebug(logName, levelOrValue string) (string, error)
- type LogLevel
- type LogType
- type ValueType
Constants ¶
const ( ConfigManagementFeature = "config-mgmt" LoadKeysFeature = "loadkeys" RoutingInstanceFeature = "routing-instance" )
Config System Feature well known names
Variables ¶
This section is empty.
Functions ¶
func CurrentLogStatus ¶
func CurrentLogStatus() string
func FormatCommitOrValErrors ¶
FormatCommitOrValErrors - pretty print commit / validation errors
These are somewhat verbose, and in the case of multiple errors for a single node, very repetitive. We print the path, then the error, then repeat the path (CLI format) for good measure.
func FormatConfigPathError ¶
FormatConfigPathError - pretty print Exists() / Expands() errors for CLI
func FormatConfigPathErrorMultiline ¶
FormatConfigPathErrorMultiline - pretty print multiline config path errors
Deal with various formats of set/delete 'configuration path' errors, which may or may not include 'Set failed' or 'Value validation failed'.
func FormatRpcPathError ¶
FormatRpcPathError - pretty print RPC errors for the CLI
func FormatWarnings ¶
func LoggingIsEnabledAtLevel ¶
func LoggingValueAndStatus ¶
func MapLogLevelToName ¶
func MapLogTypeToName ¶
func SetConfigDebug ¶
Types ¶
type LogLevel ¶
type LogLevel int
const ( // Current log levels used in configd are Error (Elog) and Debug (Dlog). // Commit 'error' level logs (which might be better described as info) // are always on. // // Order must be least verbose (none) to most verbose (debug) so we can // check what is enabled by simple numeric comparison. LevelNone LogLevel = iota LevelError LevelDebug LevelLast // Keep at end for sizing slices etc. )