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
void

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