Debug logging in custom eval.js functions2020-10-30 11:46:20
As of v3.1, there is a new feature to assist with debugging custom eval.js functions.
Here’s the enhancement description.
The function is built in (doesn’t need to appear in eval.js).
The syntax is:
uslog('Text to output',#)
(Where # is the log level you want it to write to.)
If using ONLY uslog, can be assigned to bogus attribute.
Check1=&uslog('Test Debug Logging',2)& (Plain text)
Check2=&uslog('LastName is: ^sn^',2)& (Text AND attrib value)
Or it can be used with valid attribute assignment:
Department=ABC &uslog('Logging Text AND set Dept to ABC',2)&
(This is just a convenient way of adding it to a specific attribute mapping. The logging doesn’t appear in the attribute, just the console and logs).
The output of all three of the above mappings appear in your custom map file.
Mod Object | firstname.lastname@example.org,ou=v28,ou=ROOT_ENV,dc=2k19,dc=test
Debug text appears in Console and logs.