Files
opds-proxy/convert/convert.go
Evan Buss ccc6217014 feat: structured logging improvements
This change adds a child logger with request information to the
http request context. Also improved the log format for clarity.

- Unescaped the query string
- Use JSON log format when not in dev mode.
- Added request ip to the request child logger.
- The child logger is passed to the converter so we can associate
  any errors with a specific request / file.
- Add book file name as a logger attribute
- Add user agent header as a logger attribute
- Log the "X-Forwarded-For" header, falling back to RemoteAddr
2024-08-10 20:03:34 +00:00

12 lines
293 B
Go

package convert
import "log/slog"
type Converter interface {
// Whether or not the converter is available
// Usually based on the availability of the underlying tool
Available() bool
// Convert the input file to the output file
Convert(log *slog.Logger, input string) (string, error)
}