MCPcopy Index your code
hub / github.com/coder/coder / GetChatDebugLogging

Method GetChatDebugLogging

codersdk/chats.go:2960–2971  ·  view source on GitHub ↗

GetChatDebugLogging returns the runtime admin setting that allows users to opt into chat debug logging.

(ctx context.Context)

Source from the content-addressed store, hash-verified

2958// GetChatDebugLogging returns the runtime admin setting that allows
2959// users to opt into chat debug logging.
2960func (c *ExperimentalClient) GetChatDebugLogging(ctx context.Context) (ChatDebugLoggingAdminSettings, error) {
2961 res, err := c.Request(ctx, http.MethodGet, "/api/experimental/chats/config/debug-logging", nil)
2962 if err != nil {
2963 return ChatDebugLoggingAdminSettings{}, err
2964 }
2965 defer res.Body.Close()
2966 if res.StatusCode != http.StatusOK {
2967 return ChatDebugLoggingAdminSettings{}, ReadBodyAsError(res)
2968 }
2969 var resp ChatDebugLoggingAdminSettings
2970 return resp, json.NewDecoder(res.Body).Decode(&resp)
2971}
2972
2973// UpdateChatDebugLogging updates the runtime admin setting that allows
2974// users to opt into chat debug logging.

Callers 1

Calls 3

ReadBodyAsErrorFunction · 0.85
CloseMethod · 0.65
RequestMethod · 0.45

Tested by 1