appinsightslogger

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: Apache-2.0 Imports: 8 Imported by: 4

README

logger-appinsights

Logger implementation for Microsoft Azure Application Insights

Get an Azure Application Insights instrumentation key

https://github.com/Microsoft/ApplicationInsights-Home/wiki#getting-an-application-insights-instrumentation-key

Documentation

Overview

Copyright 2018 The Nuclio Authors. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(client appinsights.TelemetryClient, name string, level logger.Level) (*Logger, error)

func (*Logger) Close

func (l *Logger) Close() error

func (*Logger) Debug

func (l *Logger) Debug(format interface{}, vars ...interface{})

Debug emits an unstructured debug log

func (*Logger) DebugCtx

func (l *Logger) DebugCtx(ctx context.Context, format interface{}, vars ...interface{})

DebugCtx emits an unstructred debug log

func (*Logger) DebugWith

func (l *Logger) DebugWith(format interface{}, vars ...interface{})

DebugWith emits a structured debug log

func (*Logger) DebugWithCtx

func (l *Logger) DebugWithCtx(ctx context.Context, format interface{}, vars ...interface{})

DebugWithCtx emits a structured debug log

func (*Logger) Error

func (l *Logger) Error(format interface{}, vars ...interface{})

Error emits an unstructured error log

func (*Logger) ErrorCtx

func (l *Logger) ErrorCtx(ctx context.Context, format interface{}, vars ...interface{})

ErrorCtx emits an unstructred error log

func (*Logger) ErrorWith

func (l *Logger) ErrorWith(format interface{}, vars ...interface{})

ErrorWith emits a structured error log

func (*Logger) ErrorWithCtx

func (l *Logger) ErrorWithCtx(ctx context.Context, format interface{}, vars ...interface{})

ErrorWithCtx emits a structured error log

func (*Logger) Flush

func (l *Logger) Flush()

Flush flushes buffered logs

func (*Logger) GetChild

func (l *Logger) GetChild(name string) logger.Logger

GetChild returns a child logger

func (*Logger) Info

func (l *Logger) Info(format interface{}, vars ...interface{})

Info emits an unstructured informational log

func (*Logger) InfoCtx

func (l *Logger) InfoCtx(ctx context.Context, format interface{}, vars ...interface{})

InfoCtx emits an unstructred info log

func (*Logger) InfoWith

func (l *Logger) InfoWith(format interface{}, vars ...interface{})

InfoWith emits a structured info log

func (*Logger) InfoWithCtx

func (l *Logger) InfoWithCtx(ctx context.Context, format interface{}, vars ...interface{})

InfoWithCtx emits a structured info log

func (*Logger) Warn

func (l *Logger) Warn(format interface{}, vars ...interface{})

Warn emits an unstructured warning log

func (*Logger) WarnCtx

func (l *Logger) WarnCtx(ctx context.Context, format interface{}, vars ...interface{})

WarnCtx emits an unstructred warn log

func (*Logger) WarnWith

func (l *Logger) WarnWith(format interface{}, vars ...interface{})

WarnWith emits a structured warning log

func (*Logger) WarnWithCtx

func (l *Logger) WarnWithCtx(ctx context.Context, format interface{}, vars ...interface{})

WarnWithCtx emits a structured warn log

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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