GSLog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2019 03:32 AM
I have:
var gl = new GSLog('myAppName', 'mySourceName');
gl.logInfo('this is a test message');
gl.logErr('this is a test message');
I get the error message in the log, but I do NOT get the info message.
I WANT info messages to write to the log for my job execution.
it looks like sn is defaulting to error level only.
what do i need to do to see the info messages?
i do NOT see a sys property OOB for log level. do I need to set one up?
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2019 04:43 AM
Hi,
you have to use the following code, the system will automatically put the log with a different Level(Debug, Error, Information, Warning):
gs.log("Hello World");
For any more details, please check the official documentation below:
Scripting alert, info, and error messages
If I have answered your question, please mark my response as correct so that others with the same question in the future can find it quickly and that it gets removed from the Unanswered list.
Thank you
Cheers
Alberto
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-08-2019 05:05 AM
doesn't answer my question.
i don't want to use gs.log
i want to use the script include GSLog and log info messages.
I have found that i can use logNotice().
the level defaults to 'Notice'
i have not found how to use logInfo.
i tried setting log level to 'info' and then using gl.logInfo()
but that did not seem to work.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2019 04:16 AM
Hi ggg,
Yes, you do need to set up a property. The name of the property should replace 'myAppName' when you initialize the GSLog object. You can model your property after an existing one--search sys_properties for properties with a name that contains "log" and choices that contains "debug" and you should find some.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-11-2022 12:01 PM
@ggg , were you able to fix this issue ?
I have my GSLog logger setup done on my scoped application. I have the property created with the logging level ( set it as 'debug' on dev instance ), but some reason it outputs only on the background scripts but not on syslog.
Any guidance is appreciated.