GlideSystem - log(String message, String source)

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

Table 1. Parameters
Name Type Description
message String The message to log.
source String (optional) The source of the message.
Table 2. Returns
Type Description

var count = new GlideAggregate('incident');
count.addQuery('active', 'true');
count.addAggregate('COUNT', 'category');
while ( {
   var category = count.category;
   var categoryCount = count.getAggregate('COUNT', 'category');
   gs.log("The are currently " + categoryCount + " incidents with a category of " + category, "Incident Counter");