isSqlLogSuppressed() function

Whether SQL logging is currently suppressed.

Signature:

export declare function isSqlLogSuppressed(): boolean;

Returns:

boolean

true while a silently() call is in progress.

Remarks

This is the read half of a cooperative protocol, and cooperative is the operative word: nothing here intercepts logging. A query-log sink has to call this and skip emitting while it answers true, and code that wants to run quietly has to wrap itself in silently(). A sink that does not check is unaffected by either.

Suppression is a single module-wide flag, not per-client or per-request, so it suits one-off work that owns the process for its duration — startup DDL, a migration, a maintenance script. Under concurrent traffic it will also silence whatever else happens to be querying at the time.

Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.