logger

package
v1.0.33 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Copyright Microsoft. All rights reserved.

Copyright Microsoft. All rights reserved.

Index

Constants

View Source
const (
	//Metrics
	HeartBeatMetricStr = "HeartBeat"

	//Dimensions
	OrchestratorTypeStr = "OrchestratorType"
	NodeIDStr           = "NodeID"
	// CNS Snspshot properties
	CnsNCSnapshotEventStr         = "CNSNCSnapshot"
	IpConfigurationStr            = "IPConfiguration"
	LocalIPConfigurationStr       = "LocalIPConfiguration"
	PrimaryInterfaceIdentifierStr = "PrimaryInterfaceIdentifier"
	MultiTenancyInfoStr           = "MultiTenancyInfo"
	CnetAddressSpaceStr           = "CnetAddressSpace"
	AllowNCToHostCommunicationStr = "AllowNCToHostCommunication"
	AllowHostToNCCommunicationStr = "AllowHostToNCCommunication"
	NetworkContainerTypeStr       = "NetworkContainerType"
	OrchestratorContextStr        = "OrchestratorContext"
)

Variables

This section is empty.

Functions

func Close

func Close()

Close CNS and AI telemetry handle

func Debugf

func Debugf(format string, args ...interface{})

func Errorf

func Errorf(format string, args ...interface{})

func InitAI

func InitAI(aiConfig aitelemetry.AIConfig, disableTraceLogging, disableMetricLogging bool, disableEventLogging bool)

Intialize CNS AI telmetry instance

func InitLogger

func InitLogger(fileName string, logLevel, logTarget int, logDir string)

Initialize CNS Logger

func InitReportChannel

func InitReportChannel(reports chan interface{})

func LogEvent added in v1.0.33

func LogEvent(event aitelemetry.Event)

func Printf

func Printf(format string, args ...interface{})

func Request

func Request(tag string, request interface{}, err error)

func Response

func Response(tag string, response interface{}, returnCode int, returnStr string, err error)

func SendHeartBeat added in v1.0.33

func SendHeartBeat(heartbeatIntervalInMins int, stopheartbeat chan bool)

func SendMetric

func SendMetric(metric aitelemetry.Metric)

Send AI telemetry metric

func SendToTelemetryService added in v1.0.33

func SendToTelemetryService(reports chan interface{}, telemetryStopProcessing chan bool)

SendCnsTelemetry - handles cns telemetry reports

func SetContextDetails

func SetContextDetails(orchestrator string, nodeID string)

Set context details for logs and metrics

func SetTargetLogDirectory

func SetTargetLogDirectory(target int, dir string) error

Types

type CNSLogger

type CNSLogger struct {
	Orchestrator         string
	NodeID               string
	DisableTraceLogging  bool
	DisableMetricLogging bool
	DisableEventLogging  bool
	// contains filtered or unexported fields
}
var (
	Log *CNSLogger
)

Jump to

Keyboard shortcuts

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