MCPcopy
hub / github.com/crowdsecurity/crowdsec / Debug

Method Debug

pkg/database/ent/client.go:222–231  ·  view source on GitHub ↗

Debug returns a new debug-client. It's used to get verbose logging on specific operations. client.Debug(). Alert. Query(). Count(ctx)

()

Source from the content-addressed store, hash-verified

220// Query().
221// Count(ctx)
222func (c *Client) Debug() *Client {
223 if c.debug {
224 return c
225 }
226 cfg := c.config
227 cfg.driver = dialect.Debug(c.driver, c.log)
228 client := &Client{config: cfg}
229 client.init()
230 return client
231}
232
233// Close closes the database connection and prevents new queries from starting.
234func (c *Client) Close() error {

Callers 15

NewClientFunction · 0.95
DeleteAlertGraphBatchMethod · 0.45
FlushAlertsMethod · 0.45
optionsMethod · 0.45
CheckExprWLMethod · 0.45
processFilterMethod · 0.45
processMethod · 0.45
FormatAsStringsMethod · 0.45
RunWithDebugFunction · 0.45
SetFromYamlMethod · 0.45
NotifyMethod · 0.45

Calls 1

initMethod · 0.95

Tested by

no test coverage detected