logging

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 4 Imported by: 7

Documentation

Overview

Copyright 2024 BeyondTrust. All rights reserved. Package logging abstraction.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogLogger

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

log.logger

func NewLogLogger

func NewLogLogger(logger *log.Logger) *LogLogger

NewLogLogger creates a new go log logger

func (*LogLogger) Debug

func (l *LogLogger) Debug(msg string)

Debug logs a message at debug level

func (*LogLogger) Error

func (l *LogLogger) Error(msg string)

Error logs a message at error level

func (*LogLogger) Info

func (l *LogLogger) Info(msg string)

Info logs a message at info level

func (*LogLogger) Warn

func (l *LogLogger) Warn(msg string)

Warn logs a message at debug level

type Logger

type Logger interface {
	Info(msg string)
	Error(msg string)
	Debug(msg string)
	Warn(msg string)
}

Logger is an interface that defines the logging methods

type LogrLogger

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

logr.logger

func NewLogrLogger

func NewLogrLogger(logger *logr.Logger) *LogrLogger

NewLogrLogger creates a new logrLogger with the given logr.logger

func (*LogrLogger) Debug

func (r *LogrLogger) Debug(msg string)

func (*LogrLogger) Error

func (r *LogrLogger) Error(msg string)

Error logs a message at error level

func (*LogrLogger) Info

func (r *LogrLogger) Info(msg string)

Info logs a message at info level

func (*LogrLogger) Warn

func (r *LogrLogger) Warn(msg string)

type ZapLogger

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

ZapLogger is a struct that implements the Logger interface using zap

func NewZapLogger

func NewZapLogger(logger *zap.Logger) *ZapLogger

NewZapLogger creates a new ZapLogger with the given zap.Logger

func (*ZapLogger) Debug

func (z *ZapLogger) Debug(msg string)

Debug logs a message at error level

func (*ZapLogger) Error

func (z *ZapLogger) Error(msg string)

Error logs a message at error level

func (*ZapLogger) Info

func (z *ZapLogger) Info(msg string)

Info logs a message at info level

func (*ZapLogger) Warn

func (z *ZapLogger) Warn(msg string)

Warn logs a message at error level

Jump to

Keyboard shortcuts

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