logger

package
v0.0.12 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetManager

func GetManager() *manager

GetManager - This function returns singleton instance of Logger Manager

Types

type Error

type Error struct {
	Err error
}

Error Object

func NewError

func NewError(err error) *Error

NewError - return a new instance of Error

func (*Error) Error

func (err *Error) Error() string

Error method - satisfying error interface

type LogMeWrapper

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

LogMeWrapper structure - implements Logger interface

func (*LogMeWrapper) Close

func (l *LogMeWrapper) Close()

Close - it closes logger channel

func (*LogMeWrapper) Constructor

func (l *LogMeWrapper) Constructor(name string) error

Constructor - It initializes the logger configuration params

func (*LogMeWrapper) Instance added in v0.0.10

func (l *LogMeWrapper) Instance() *log.Logger

Instance - returns exact logger instance

func (*LogMeWrapper) IsInitialized

func (l *LogMeWrapper) IsInitialized() bool

IsInitialized - that returns boolean value whether it's initialized

func (*LogMeWrapper) Log

func (l *LogMeWrapper) Log(obj *types.LogObject)

Log - write log object to the channel

func (*LogMeWrapper) Sync

func (l *LogMeWrapper) Sync()

Sync - sync all logs to medium

type OutputOption

type OutputOption struct {
	LevelStr string         `json:"level"`
	Level    types.LogLevel `json:"-"`
	Path     string         `json:"path,omitempty"`
	// contains filtered or unexported fields
}

type ZapWrapper

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

ZapWrapper structure - implements Logger interface

func (*ZapWrapper) Close

func (l *ZapWrapper) Close()

Close - it closes logger channel

func (*ZapWrapper) Constructor

func (l *ZapWrapper) Constructor(name string) error

Constructor - It initializes the logger configuration params

func (*ZapWrapper) Instance

func (l *ZapWrapper) Instance() *zap.Logger

Instance - returns exact logger instance

func (*ZapWrapper) IsInitialized

func (l *ZapWrapper) IsInitialized() bool

IsInitialized - that returns boolean value whether it's initialized

func (*ZapWrapper) Log

func (l *ZapWrapper) Log(obj *types.LogObject)

Log - write log object to the channel

func (*ZapWrapper) Sync

func (l *ZapWrapper) Sync()

Sync - call the sync method of the project

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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