accesslog

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BufferedLogger

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

BufferedLogger is a logger that buffers log entries and writes them to a file or stderr.

func NewBufferedLogger

func NewBufferedLogger(opts config.AccessLogOptions) (*BufferedLogger, error)

NewBufferedLogger creates a new BufferedLogger instance.

func (*BufferedLogger) Close

func (l *BufferedLogger) Close() error

Close closes the logger and releases resources.

func (*BufferedLogger) Flush

func (l *BufferedLogger) Flush() error

Flush flushes the buffer to the underlying file.

func (*BufferedLogger) Write

func (l *BufferedLogger) Write(log string)

Write writes a log entry to the buffer.

type Tracer

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

Tracer is used to record access logs.

func NewTracer

func NewTracer(opts config.AccessLogOptions) (*Tracer, error)

NewTracer creates a new access log tracer with given options.

func (*Tracer) Close

func (t *Tracer) Close() error

Close closes the tracer's writer.

func (*Tracer) Finish

func (t *Tracer) Finish(_ context.Context, c *app.RequestContext)

Finish implements the tracer.Tracer interface.

func (*Tracer) Start

Start implements the tracer.Tracer interface.

Jump to

Keyboard shortcuts

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