logger

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2025 License: MIT Imports: 10 Imported by: 9

Documentation

Overview

Copyright Microsoft. All rights reserved.

Copyright Microsoft. All rights reserved.

Index

Constants

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

	HomeAZStr                       = "HomeAZ"
	IsAZRSupportedStr               = "IsAZRSupported"
	IsAZRDualStackFixPresentStr     = "IsAZRDualStackFixPresent"
	HomeAZErrorCodeStr              = "HomeAZErrorCode"
	HomeAZErrorMsgStr               = "HomeAZErrorMsg"
	CNSConfigPropertyStr            = "CNSConfiguration"
	CNSConfigMD5CheckSumPropertyStr = "CNSConfigurationMD5Checksum"

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

Variables

View Source
var (
	Log             loggershim
	AppInsightsIKey = aiMetadata
)

Functions

func Close deprecated

func Close()

Deprecated: The global logger is deprecated. Migrate to zap using the cns/logger/v2 package and pass the logger instead.

func Debugf deprecated

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

Deprecated: The global logger is deprecated. Migrate to zap using the cns/logger/v2 package and pass the logger instead.

func Errorf deprecated

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

Deprecated: The global logger is deprecated. Migrate to zap using the cns/logger/v2 package and pass the logger instead.

func InitAI deprecated

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

Deprecated: The global logger is deprecated. Migrate to zap using the cns/logger/v2 package and pass the logger instead.

func InitAIWithIKey deprecated

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

Deprecated: The global logger is deprecated. Migrate to zap using the cns/logger/v2 package and pass the logger instead.

func InitLogger deprecated

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

Deprecated: The global logger is deprecated. Migrate to zap using the cns/logger/v2 package and pass the logger instead.

func LogEvent deprecated

func LogEvent(event aitelemetry.Event)

Deprecated: The global logger is deprecated. Migrate to zap using the cns/logger/v2 package and pass the logger instead.

func New deprecated added in v1.6.22

func New(fileName string, logLevel, logTarget int, logDir string) (loggershim, error)

Deprecated: The v1 logger is deprecated. Migrate to zap using the cns/logger/v2 package.

func Printf deprecated

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

Deprecated: The global logger is deprecated. Migrate to zap using the cns/logger/v2 package and pass the logger instead.

func Request deprecated

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

Deprecated: The global logger is deprecated. Migrate to zap using the cns/logger/v2 package and pass the logger instead.

func Response deprecated

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

Deprecated: The global logger is deprecated. Migrate to zap using the cns/logger/v2 package and pass the logger instead.

func ResponseEx deprecated

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

Deprecated: The global logger is deprecated. Migrate to zap using the cns/logger/v2 package and pass the logger instead.

func SendMetric deprecated

func SendMetric(metric aitelemetry.Metric)

Deprecated: The global logger is deprecated. Migrate to zap using the cns/logger/v2 package and pass the logger instead.

func SetContextDetails deprecated

func SetContextDetails(orchestrator, nodeID string)

Deprecated: The global logger is deprecated. Migrate to zap using the cns/logger/v2 package and pass the logger instead.

func Warnf deprecated

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

Deprecated: The global logger is deprecated. Migrate to zap using the cns/logger/v2 package and pass the logger instead.

Types

This section is empty.

Directories

Path Synopsis
v2
Package logger provides an opinionated logger for CNS which knows how to log to Application Insights, file, stdout and ETW (based on platform).
Package logger provides an opinionated logger for CNS which knows how to log to Application Insights, file, stdout and ETW (based on platform).

Jump to

Keyboard shortcuts

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