gs.log logs where?

patricklatella
Mega Sage

Does gs.log log to Script log statements?   I'm confused about the difference between System Logs and Script Log Statements modules.   thanks!

1 ACCEPTED SOLUTION

Anurag Tripathi
Mega Patron
Mega Patron

All the logs go in syslog_list table only, the difference is in the SOURCE of that logs that differentiates between each.


-Anurag

View solution in original post

8 REPLIES 8

JJ1
Kilo Guru

Both modules are referring to the same form   syslog but with different query .if you use a gs.log with out specifying a source (second parameter )in it,servicenow will add '*** Script' to the source field of the logs.. so scripted log module query with - source=*** Script.Other system logs   if you check ,you   can see the query searches with different log level values and all source values.




3.11 log(String message, String source)

Logs a message to the system log and saves it to the syslog table.


3.11.1 Input Fields

Parameters:


  • String message - message to log, for the log's Message field.
  • String source - (optional) the source of the message, for the log's Source field.

thanks Jeevan, so it is accurate to say that gs.log() logs to System Log?


Yes,ofcourse


Anurag Tripathi
Mega Patron
Mega Patron

All the logs go in syslog_list table only, the difference is in the SOURCE of that logs that differentiates between each.


-Anurag