logger

package
v0.0.0-...-9cb16bd Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package logger creates a logger instance

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct{ *zap.Logger }

Logger is a wrapper around `zap.Logger` that adds a few methods. @property - `Logger` is the name of the struct.

func NewLogger

func NewLogger(opts ...Option) (*Logger, error)

NewLogger creates a new logger with the given level and returns it

type LoggerOptions

type LoggerOptions struct {
	Level string
	Name  string
}

type Option

type Option func(*LoggerOptions)

Option is the func interface to assign options

func WithLoggerLevel

func WithLoggerLevel(level string) Option

WithLoggerLevel sets the logger level

func WithLoggerName

func WithLoggerName(name string) Option

WithLoggerName sets the logger name

Jump to

Keyboard shortcuts

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