libLogger

package
v0.28.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package libLogger provides structured logging utilities for requestCore.

Index

Constants

View Source
const (
	// SlogRequestBody is the slog attribute key for request body logging.
	SlogRequestBody = "slog.request.body"
	// SlogResponseBody is the slog attribute key for response body logging.
	SlogResponseBody = "slog.response.body"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONLogger added in v0.28.1

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

JSONLogger is a logger that writes structured JSON log entries via slog.

func (JSONLogger) Write added in v0.28.1

func (j JSONLogger) Write(p []byte) (n int, err error)

Write logs the given bytes as an info-level slog message, implementing io.Writer.

type LoggerInterface

type LoggerInterface interface {
	GetLogPath() string
	GetLogSize() int
	GetLogCompress() bool
	GetSkipPaths() []string
	GetHeaderName() string
}

LoggerInterface defines the interface for accessing logging configuration parameters.

type StdoutLogger

type StdoutLogger struct {
}

StdoutLogger is a logger that writes log output to standard output.

func (StdoutLogger) Config

func (logger StdoutLogger) Config(wsParams libParams.ParamInterface) gin.LoggerConfig

Config returns a gin.LoggerConfig configured for stdout logging with the application's log settings.

func (StdoutLogger) Write

func (logger StdoutLogger) Write(p []byte) (n int, err error)

Write writes the given bytes to standard output, implementing io.Writer.

Directories

Path Synopsis
Package splunk provides Splunk HTTP event collector integration for requestCore logging.
Package splunk provides Splunk HTTP event collector integration for requestCore logging.

Jump to

Keyboard shortcuts

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