Console Logs
View console.log output from your Worker
FlareDesk captures all console.log output from your Worker code, making it easy to debug and understand execution flow.
Log Levels
console.log / console.infoGeneral information
console.warnWarnings (displayed in amber)
console.errorErrors (displayed in red)
console.debugDebug messages
Viewing Console Logs
- 1
Navigate to Logs in the sidebar
- 2
Click the "Console" tab
- 3
View all console output in real-time
Each Log Entry Shows
- Timestamp: When the log was written
- Level: log, warn, error, debug, info
- Message: The logged content
Example
In your Worker code:
export default {
async fetch(request, env) {
console.log('Request received:', request.url);
console.warn('Deprecated endpoint used');
console.error('Something went wrong', error);
return new Response('OK');
}
}
All of these logs will appear in the Console tab in FlareDesk, with appropriate color coding.
Tips
Log Objects
Use console.log(JSON.stringify(obj, null, 2)) for formatted object output.
Use Labels
Prefix logs with labels like [AUTH] or [DB] to make filtering easier.
Clear Regularly
Click "Clear" to reset the console when it gets cluttered.