Console Capture
Signal JS automatically captures console logs, JavaScript errors, and unhandled promise rejections.Configuration
Captured Events
Console Log Events
JavaScript Error Events
Unhandled Rejection Events
Console Levels
Control which console levels are captured:Error Capture
Uncaught Errors
Automatically capture uncaught JavaScript errors:Unhandled Promise Rejections
Capture promises that are rejected without a.catch() handler:
Message Limits
Maximum Message Length
Limit the length of captured messages to prevent excessive data:Maximum Arguments
Limit the number of arguments captured per log call:Sensitive Data Masking
Automatically mask sensitive data in console logs:- Passwords
- Credit card numbers
- Social Security Numbers
- API keys
- JWT tokens
- Email addresses (partially)
Example: Complete Configuration
Use Cases
- Debug production issues by seeing console logs from user sessions
- Track JavaScript errors with full stack traces
- Monitor unhandled rejections to catch async errors
- Correlate errors with user actions in session replay
- Debug API issues by seeing console logs alongside network requests
Best Practices
- Enable error capture in production to catch unexpected errors
- Use appropriate log levels (
error,warn) for important messages - Avoid logging sensitive data - rely on automatic masking as a safety net
- Set reasonable limits on message length and arguments to prevent excessive data
- Review captured logs regularly to identify common issues
