log

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IOLogger

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

IOLogger is a wrapper around io.Reader and io.Writer that can be used to log the data being read and written from the underlying streams

func NewIOLogger

func NewIOLogger(r io.Reader, w io.Writer, logger *log.Logger) *IOLogger

NewIOLogger creates a new IOLogger instance

func (*IOLogger) Read

func (l *IOLogger) Read(p []byte) (n int, err error)

Read reads data from the underlying io.Reader and logs it.

func (*IOLogger) Write

func (l *IOLogger) Write(p []byte) (n int, err error)

Write writes data to the underlying io.Writer and logs it.

Jump to

Keyboard shortcuts

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