util

package
v0.0.0-...-562cd84 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INFO = 0 + iota
	WARNING
	ERROR
	FATAL
	INFO_DEBUG
	INFO_API
	INFO_DATA
	INFO_DETAIL
	INFO_TRACE
	INFO_ALL
)
View Source
const (
	TRACE_MIN      = 0
	TRACE_MAX      = 8
	TRACE_CACHE    = 1 << TRACE_MIN
	TRACE_LIBYANG  = 1 << 1
	TRACE_YPARSER  = 1 << 2
	TRACE_CREATE   = 1 << 3
	TRACE_UPDATE   = 1 << 4
	TRACE_DELETE   = 1 << 5
	TRACE_SEMANTIC = 1 << 6
	TRACE_ONERROR  = 1 << 7
	TRACE_SYNTAX   = 1 << TRACE_MAX
)
View Source
const CVL_LOG_FILE = "/tmp/cvl.log"

Variables

View Source
var CVL_CFG_FILE string = "/usr/sbin/cvl_cfg.json"
View Source
var CVL_SCHEMA string = "schema/"
View Source
var Tracing bool = false

Functions

func CVL_LEVEL_LOG

func CVL_LEVEL_LOG(level CVLLogLevel, format string, args ...interface{})

func ConfigFileSyncHandler

func ConfigFileSyncHandler()

func IsTraceLevelSet

func IsTraceLevelSet(tracelevel CVLTraceLevel) bool

func IsTraceSet

func IsTraceSet() bool

func ReadConfFile

func ReadConfFile() map[string]string

func SetTrace

func SetTrace(on bool)

func SkipSemanticValidation

func SkipSemanticValidation() bool

func SkipValidation

func SkipValidation() bool

func TRACE_LEVEL_LOG

func TRACE_LEVEL_LOG(tracelevel CVLTraceLevel, fmtStr string, args ...interface{})

Types

type CVLLogLevel

type CVLLogLevel uint8

Logging Level for CVL global logging.

type CVLTraceLevel

type CVLTraceLevel uint32

Logging levels for CVL Tracing.

Jump to

Keyboard shortcuts

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