slogger

package
v0.0.0-...-f54e1bb Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: BSD-3-Clause Imports: 4 Imported by: 1

README

slogger

import "github.com/blueprint-uservices/blueprint/runtime/plugins/slogger"

Index

type SLogger

SLogger implements the backend.Logger interface by wrapping calls to golang's slog package.

type SLogger struct{}

func NewSLogger
func NewSLogger(ctx context.Context) (*SLogger, error)

Returns a new logger object

func (*SLogger) Debug
func (l *SLogger) Debug(ctx context.Context, format string, args ...any) (context.Context, error)

Implements backend.Logger

func (*SLogger) Error
func (l *SLogger) Error(ctx context.Context, format string, args ...any) (context.Context, error)

Implements backend.Logger

func (*SLogger) Info
func (l *SLogger) Info(ctx context.Context, format string, args ...any) (context.Context, error)

Implements backend.Logger

func (*SLogger) Logf
func (l *SLogger) Logf(ctx context.Context, opts backend.LogOptions, format string, args ...any) (context.Context, error)

Implements backend.Logger

func (*SLogger) Warn
func (l *SLogger) Warn(ctx context.Context, format string, args ...any) (context.Context, error)

Implements backend.Logger

Generated by gomarkdoc

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SLogger

type SLogger struct{}

SLogger implements the backend.Logger interface by wrapping calls to golang's slog package.

func NewSLogger

func NewSLogger(ctx context.Context) (*SLogger, error)

Returns a new logger object

func (*SLogger) Debug

func (l *SLogger) Debug(ctx context.Context, format string, args ...any) (context.Context, error)

Implements backend.Logger

func (*SLogger) Error

func (l *SLogger) Error(ctx context.Context, format string, args ...any) (context.Context, error)

Implements backend.Logger

func (*SLogger) Info

func (l *SLogger) Info(ctx context.Context, format string, args ...any) (context.Context, error)

Implements backend.Logger

func (*SLogger) Logf

func (l *SLogger) Logf(ctx context.Context, opts backend.LogOptions, format string, args ...any) (context.Context, error)

Implements backend.Logger

func (*SLogger) Warn

func (l *SLogger) Warn(ctx context.Context, format string, args ...any) (context.Context, error)

Implements backend.Logger

Jump to

Keyboard shortcuts

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