httplog.LogEntry should return *slog.Logger instead of slog.Logger because then, the returned value implements interfaces for the slog API. Reason is that slog’s Logger methods need pointer receivers.
Note that *slog.Logger is used in slog’s own code all over the place, and even httplog’s LogEntry needs to de-reference in order to return a plain slog.Logger.
httplog.LogEntryshould return*slog.Loggerinstead ofslog.Loggerbecause then, the returned value implements interfaces for the slog API. Reason is that slog’s Logger methods need pointer receivers.Note that
*slog.Loggeris used in slog’s own code all over the place, and even httplog’sLogEntryneeds to de-reference in order to return a plainslog.Logger.