console object provides a set of methods to help you emit logs, warnings, and debug code.
However, some methods are no ops — they can be called, and do not emit an error, but do not do anything. This ensures compatibility with libraries which may use these APIs.
The table below enumerates each method, and the extent to which it is supported in Workers.
All methods noted as “✅ supported” have the following behavior:
- They will be written to the console in local dev (
npx wrangler@latest dev)
- They will appear in live logs, when tailing logs in the dashboard or running
- They will create entries in the
logsfield of events and , which can be pushed to a destination of your choice via .
All methods noted as “🟡 partial support” have the following behavior:
- In both production and local development the method can be safely called, but will do nothing (no op)
- In the , Quick Editor in the Workers dashboard, and remote preview mode (
wrangler dev --remote) calling the method will behave as expected, print to the console, etc.