- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2023 10:24 PM
I'm looking for a way to log to the syslog table like "gs.info" in a client script.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2023 11:14 PM
If you want to log it log table then you need get the logic converted to a Script Include & then call the Script Include from Client Script.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2023 11:06 PM
To log to the syslog table in a client script in ServiceNow, you can use the gs.addInfoMessage() method. This method adds an info message to the session log and the log entries are stored in the syslog table.
Here's an example of how to use it:
gs.addInfoMessage('This is an info message logged to the syslog table.');
This will log the message to the syslog table with the severity level set to info. You can also use gs.addErrorMessage() to log error messages to the syslog table.
Thanks,
Rahul Kumar
Thanks,
Rahul Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2023 11:46 PM
thank you.
But this didn't work.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-23-2023 11:14 PM
If you want to log it log table then you need get the logic converted to a Script Include & then call the Script Include from Client Script.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2023 11:47 PM
I use the same method as a substitute.