Documentation ¶
Overview ¶
Package slog_helpers provides functionality to transform some golang types into a loggable by the package log/slog. As all this module oriented to improve error handling, I think it's right place for this package. Also, those helpers are used inside the project in domain_errors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HttpReqToSlog ¶
func HttpReqToSlog(r *http.Request, cfg RequestToSlogCfg) ([]any, error)
HttpReqToSlog converts an HTTP request (URL, Headers, Body) to the loggable by slog format TODO: Add IP logging
Types ¶
type RequestToSlogCfg ¶
Click to show internal directories.
Click to hide internal directories.