logger

package
v1.6.16 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: MIT Imports: 9 Imported by: 9

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"
	HomeAZStr           = "HomeAZ"
	IsAZRSupportedStr   = "IsAZRSupported"
	HomeAZErrorCodeStr  = "HomeAZErrorCode"
	HomeAZErrorMsgStr   = "HomeAZErrorMsg"

	// 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()

func Debugf

func Debugf(format string, args ...any)

func Errorf

func Errorf(format string, args ...any)

func InitAI

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

func InitAIWithIKey

func InitAIWithIKey(aiConfig aitelemetry.AIConfig, instrumentationKey string, disableTraceLogging, disableMetricLogging, disableEventLogging bool)

func InitLogger

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

func LogEvent

func LogEvent(event aitelemetry.Event)

func Printf

func Printf(format string, args ...any)

func Request

func Request(tag string, request any, err error)

func Response

func Response(tag string, response any, returnCode types.ResponseCode, err error)

func ResponseEx

func ResponseEx(tag string, request, response any, returnCode types.ResponseCode, err error)

func SendMetric

func SendMetric(metric aitelemetry.Metric)

func SetContextDetails

func SetContextDetails(orchestrator, nodeID string)

func Warnf

func Warnf(format string, args ...any)

Types

type CNSLogger

type CNSLogger struct {
	DisableTraceLogging  bool
	DisableMetricLogging bool
	DisableEventLogging  bool

	Orchestrator string
	NodeID       string
	// contains filtered or unexported fields
}
var (
	Log *CNSLogger
)

func NewCNSLogger

func NewCNSLogger(fileName string, logLevel, logTarget int, logDir string) (*CNSLogger, error)

func (*CNSLogger) Close

func (c *CNSLogger) Close()

func (*CNSLogger) Debugf

func (c *CNSLogger) Debugf(format string, args ...any)

func (*CNSLogger) Errorf

func (c *CNSLogger) Errorf(format string, args ...any)

func (*CNSLogger) InitAI

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

func (*CNSLogger) InitAIWithIKey

func (c *CNSLogger) InitAIWithIKey(aiConfig aitelemetry.AIConfig, instrumentationKey string, disableTraceLogging, disableMetricLogging, disableEventLogging bool)

func (*CNSLogger) LogEvent

func (c *CNSLogger) LogEvent(event aitelemetry.Event)

func (*CNSLogger) Printf

func (c *CNSLogger) Printf(format string, args ...any)

func (*CNSLogger) Request

func (c *CNSLogger) Request(tag string, request any, err error)

func (*CNSLogger) Response

func (c *CNSLogger) Response(tag string, response any, returnCode types.ResponseCode, err error)

func (*CNSLogger) ResponseEx

func (c *CNSLogger) ResponseEx(tag string, request, response any, returnCode types.ResponseCode, err error)

func (*CNSLogger) SendMetric

func (c *CNSLogger) SendMetric(metric aitelemetry.Metric)

func (*CNSLogger) SetContextDetails

func (c *CNSLogger) SetContextDetails(orchestrator, nodeID string)

func (*CNSLogger) Warnf

func (c *CNSLogger) Warnf(format string, args ...any)

Jump to

Keyboard shortcuts

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