Overview
Themetadb.log table stores logging information for the entire Metadb system. This table contains all log messages with their timestamps and severity levels, providing a complete audit trail of system activity.
For quick access to recent logs, use the
mdblog() function instead. The metadb.log table is useful when you need to query historical logs with complex filtering.Schema
The timestamp when the log entry was written, with millisecond precision
The severity level of the log message. Values include (from least to most severe):
- INFO - Informational messages about normal operations
- WARNING - Potential issues that don’t prevent operation
- ERROR - Errors affecting specific operations
- FATAL - Critical errors that may cause system shutdown
The complete log message text
Usage
Query Recent Logs
Example Output
Use Cases
Find All Errors in Date Range
Find All Errors in Date Range
Query all error and fatal messages within a specific time period:
Search Logs by Pattern
Search Logs by Pattern
Find log entries matching specific keywords or patterns:
Count Errors by Severity
Count Errors by Severity
Get a summary of log entries by severity level:
Monitor Specific Data Source
Monitor Specific Data Source
Track log messages related to a specific data source:
Export Logs for Analysis
Export Logs for Analysis
Export logs to a file for external analysis:
Severity Levels Explained
INFO
Normal operational messages that indicate successful operations or state changes:
- Stream processor started/stopped
- Data source synchronization events
- Checkpoint completions
- User management actions
WARNING
Potential issues that should be monitored but don’t prevent operation:
- High memory or CPU usage
- Increasing consumer lag
- Slow query performance
- Connection retries
ERROR
Errors that affect specific operations but don’t crash the system:
- Connection failures
- Query failures
- Data type conversion errors
- Invalid configuration
FATAL
Critical errors that may cause system shutdown or significant data loss:
- Database connection loss
- Unrecoverable stream processing errors
- Critical configuration failures
Indexing and Performance
Themetadb.log table can grow large over time. For better query performance:
Comparison with mdblog()
Usemdblog() function for:
- Quick access to recent logs (last 1-24 hours)
- Simple time-based filtering
- Interactive troubleshooting
metadb.log table for:
- Complex queries with multiple conditions
- Historical log analysis beyond 24 hours
- Aggregations and statistical analysis
- Exporting logs to external systems
Related Resources
mdblog() Function
Quick access to recent log messages
ps() Function
Monitor currently running queries
metadb.table_update
Track table update timing and performance
Monitoring Functions
Query logs and processes programmatically
