What This Table Is
The syslog table captures every server-side log message generated by ServiceNow's logging API calls. When developers call gs.log(), gs.info(), gs.warn(), or gs.error() from Business Rules, Script Includes, or any server-side script, those messages land here. It also captures system-generated log entries from platform operations, workflow activities, and integration failures.
This table belongs to the Platform module and supports debugging and monitoring across the entire ServiceNow instance. It's not part of any specific ITSM process but serves as the central audit trail for all server-side logging activity. System administrators use it for troubleshooting, developers use it for debugging custom scripts, and monitoring teams query it for error patterns.
The syslog table is a standalone table that doesn't extend any parent. No other tables extend it either. Each record represents a single log event with its timestamp, severity level, source, and message content. The table maintains referential links to the user session and source transaction when available.
At enterprise scale, this table grows aggressively. Large instances generate 50,000+ records daily. High-volume integrations, chatty Business Rules, and debug logging can push that to hundreds of thousands of records per day. ServiceNow's log rotation typically keeps 30-90 days of data, but even that represents millions of records. Query performance degrades rapidly without proper date filters.
When You'll Script Against This Table
Most developers query syslog from Script Includes when building debugging utilities, monitoring dashboards, or error reporting scripts. Background Scripts are common for one-off investigations — finding specific error patterns or tracking down performance issues. Scheduled Jobs query it for automated monitoring, sending alerts when error thresholds are exceeded. You rarely hit it from Business Rules or UI Actions since those contexts should be focused on business logic, not log analysis.
Access requires admin role by default. The syslog_reader role provides read-only access for developers who need to query logs without full admin privileges. Global scope scripts have unrestricted access, but scoped applications can only see logs generated within their scope unless explicitly granted cross-scope permissions.
Common scripting patterns:
- Debug script troubleshooting — finding your own
gs.log()messages from recent test runs - Error pattern analysis — counting specific error types over time periods
- Performance monitoring — tracking Business Rule execution times and bottlenecks
- Integration debugging — finding failed web service calls and API errors
- User session analysis — tracking log entries for specific user activities
- Automated alerting — scheduled jobs that detect error spikes and notify administrators
- Log cleanup utilities — archiving or deleting old entries beyond retention policies
Table Gotchas
Never query syslog without date filters. A simple gr.query() on a production instance can timeout after scanning millions of records. Always use created_on with DATEPART operators or specific date ranges.
- The
levelfield stores integer values (0=error, 1=warn, 2=info, 3=debug) not the string labels you see in the UI - Log entries from scoped applications include the scope prefix in the
sourcefield — filter carefully to avoid missing entries
The message field is truncated at 4000 characters. Long log messages get cut off silently — design your logging calls accordingly.
- System-generated entries often have empty
user_namefields — background processes and scheduled jobs don't run as specific users - Performance trap: sorting by message content or using CONTAINS queries on the message field bypasses indexes completely
Log rotation happens automatically but timing varies by instance. Don't assume logs older than 30 days still exist — check your instance's log rotation policy before building historical reports.
Enjoying this? Get one deep-dive per week.
Join 1,000+ ServiceNow pros — scripts, GlideRecord patterns, Flow Designer techniques, and career moves. Free.
Related Tables
The sys_user table connects through the user_name field when log entries are generated during user sessions. The sys_user_session table provides session context for understanding user activity patterns that generated specific log entries. These relationships help track down which user actions triggered problematic Business Rules or script execution.
Developers commonly join with sys_script and sys_script_include when the source field references specific script names. This helps identify which Business Rules or Script Includes are generating excessive log entries or throwing errors. The sys_transform_map and sys_import_set tables frequently appear in cross-references since data imports generate substantial logging activity, especially when transformations fail or encounter data quality issues.