The CreatorCon Call for Content is officially open! Get started here.

OnBefore Transform Script's log.info(str) Not Working

JosephW1
Tera Guru

Hello, does anyone know what causes the symptom shown in this script to occur? Thanks!

EDIT: See the Import sets properties [ServiceNow Docs] page for more info on Import Set properties, as there is no "Import Set Properties" module in the platform. Thanks @János

onBefore Transform Script

(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
	log.info(source.sys_import_row + ' info'); //does not get created
	log.warn(source.sys_import_row + ' warn'); //gets created successfully
	log.error(source.sys_import_row + ' error'); //gets created successfully
})(source, map, log, target);

 

Transform History Form

Here are the results when ran on an import set that has 3 import rows. You can see that both A) the transform script ran because the warn and error lines are present and B) the log.info(str) did not work properly because the info lines are missing.

find_real_file.png

 

Any ideas? Thanks!
BTW: This is on a fresh PDI and using a global table, transform map, and transform script.

1 ACCEPTED SOLUTION

Ignore the now deleted message. That's the wrong property to set. glide.importlog.log_to_table is the correct one.

View solution in original post

15 REPLIES 15

JosephW1
Tera Guru

Does anyone have any other ideas, please? I'm not finding any documentation on the transform map's log object's logging verbosity.

It's frustrating having to design prototype code that is using the wrong level of logging - always error or warn, never info - just because log.info is off-limits to me right now in my PDI.

Import sets properties: look for property com.glide.import_set.importlog_level.

Thanks Janos! I did not have that property. I've added it but I'm still not receiving these info-level GlideImportLog log statements. They don't even show up in the syslog table. I would imagine that this issue present in all fresh San Diego PDIs, as I've customized almost nothing in this PDI.

The issue remains. Thank you, though, but do you have any other ideas what I may be missing?

find_real_file.png

It might be is a case issue. The documentation says INFO, not info. Indeed testing it with info made it not work (it did/does when switching to INFO).

Actually I was wrong, you need to set glide.importlog.log_to_table to true for Info to work. Funny thing is it's all there, I just didn't look thoroughly 🙂

Look at the very 1st entry:

find_real_file.png