log

package
v3.0.16 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Plugin = New()

Plugin is the default log plugin.

Functions

func IOHandler

func IOHandler(ctx context.Context, request []byte, next core.NextIOHandler) (response []byte, err error)

IOHandler is the default io handler for log.

func InvokeHandler

func InvokeHandler(ctx context.Context, name string, args []interface{}, next core.NextInvokeHandler) (result []interface{}, err error)

InvokeHandler is the default io handler for log.

Types

type Log

type Log struct {
	Println func(v ...interface{})
	Enabled bool
}

Log plugin for hprose.

func New

func New(f ...func(v ...interface{})) *Log

New returns a Log instance.

func (*Log) IOHandler

func (log *Log) IOHandler(ctx context.Context, request []byte, next core.NextIOHandler) (response []byte, err error)

IOHandler for log.

func (*Log) InvokeHandler

func (log *Log) InvokeHandler(ctx context.Context, name string, args []interface{}, next core.NextInvokeHandler) (result []interface{}, err error)

InvokeHandler for log.

Jump to

Keyboard shortcuts

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