Logs
Log monitoring and management in Squadbase
What are Logs?
Logs let you view your project's runtime logs and access logs. Use them for error troubleshooting, verifying application behavior, and security monitoring.
Key Features
- Two types of logs: Runtime logs and Access logs
- Flexible time ranges: From 10 minutes to 1 day, or custom ranges
- Environment filters: Switch between Production and Preview environments
- Real-time monitoring: View the latest logs immediately
How to Access
Project details screen > Logs tab
Using the Logs Screen
Switching Tabs
Use the tabs at the top of the screen to switch between log types.
Runtime logs:
- Application execution logs
- Errors, warnings, informational messages, etc.
Access logs:
- HTTP request logs
- Request URLs, status codes, response times, etc.
Types of Logs
Squadbase provides two types of logs: Runtime logs and Access logs. Use both to get a complete picture of your application's behavior.
Runtime Logs
Logs related to application operations.
Information included:
- Error: Application errors
- Warning: Potential issues
- Info: General operational information
- Debug: Detailed debugging information
Use cases:
- Investigating error causes
- Verifying application behavior
- Identifying performance issues
Access Logs
Logs related to HTTP requests.
Information included:
- Request URL
- HTTP method (GET, POST, etc.)
- Status code (200, 404, 500, etc.)
- Response time
- Client IP
Use cases:
- Analyzing access patterns
- Identifying 404 errors
- Security monitoring
Filtering and Search
Time Range Selection
Select a time range using radio buttons.
Preset ranges:
- 10m: Last 10 minutes
- 30m: Last 30 minutes
- 1h: Last 1 hour
- 3h: Last 3 hours
- 1d: Last 1 day
Custom range:
- Click the "custom date range" button
- Specify start and end date/time
Environment
Select an environment from the dropdown.
- Production: Production environment logs
- Preview: Preview environment logs
Local Timezone
Select the timezone for displaying log timestamps.
- Example: "Local Timezone (America/New_York)"
- Displaying in local timezone makes it easier to verify times
Search
Filter logs by keywords.
How to use:
- Enter a keyword in the search box
- Examples: "Error", "404", "database"
- Click the "Search" button
Search tips:
- Enter part of an error message
- Search by file or function name
- Filter by status code
Tips & FAQ
Q: How long are logs retained?
A: Log retention period may vary depending on your plan. Please contact support for details.
Q: Can I download logs?
A: The current screen does not have a direct download feature. If needed, you can copy and paste logs, or consider using an external log management tool.
Q: Can I monitor logs in real-time?
A: With the screen open, you can achieve near real-time monitoring by setting the time range to a short duration like "10m" and refreshing periodically.
Q: There are too many error logs and it's hard to read
A:
- Set a shorter time range (10m, 30m)
- Use the search function to filter error messages
- Switch between environments to check Production/Preview separately
Q: No logs are displayed
A: Please check the following:
- Is the correct environment (Production/Preview) selected?
- Is the time range appropriate (is the application active during that time)?
- Has the deployment completed successfully?
Basic Error Investigation Steps
Detect Anomalies with Analytics
Monitor your Analytics for unusual patterns:
- Sudden drops in access
- Unexpected traffic spikes
- Changes in user behavior
Investigate the Cause in Logs
Use the Logs tab to identify the root cause:
- Check error messages in Runtime logs
- Identify 404 or 500 errors in Access logs
- Note the timestamp and affected endpoints
Check History in Deployments
Review the Project deployments tab:
- Identify when the problem started
- Compare recent changes
- Rollback to a previous deployment if necessary
Fix and Deploy
Resolve the issue and redeploy:
- Fix code in the Editor
- Test the changes
- Create a new deployment
Recommended Usage
- Post-deployment verification: Always check logs immediately after a new deployment to ensure there are no errors
- Regular monitoring: For critical applications, make it a habit to check logs regularly
- Immediate verification when issues occur: When users report problems, check the Logs tab right away
- Check by environment: When testing in Preview environment, also check logs to ensure there are no issues