Messages not printing to the Console Log

Don Biven
Kilo Contributor

While debugging a Service Portal widget server script, I placed several console.log statements in the code to examine variable values through a loop. There should have been 48 items printed to the console, but only a few showed up.

So I pulled the system logs and found several statements like this:

"2017-09-07 15:17:27 (470) Default-thread-3 8022ABB5DB054F80E6C1F3421F9619EB WARNING *** WARNING *** Refusing message: CONSOLE:number: INC0695216".

Any body got any ideas as to why these statements are not getting written to the console? What would cause the "Refusing Message" warning?

1 ACCEPTED SOLUTION

lakshminarayan4
ServiceNow Employee

Hi,


You can place max 100 console.log statements per transaction ( like c.server.update statement ). After that system will refuse any log statements and place them in system logs. Unfortunately   this number is not exposed outside world . so you can't modify this number.



Please Hit ✅Correct, ��Helpful, or ��Like depending on the impact of the response



Thanks


- YLN


View solution in original post

3 REPLIES 3

Fatih Gunaydin
Giga Contributor

Hi Donald,



Could you try gs.log() intead of console.log() and review in System Logs?


shruti_tyagi
ServiceNow Employee

Hi Donald,



Which browser you are using? If its happening on chrome check the log level of log statement selected.



Screen Shot 2017-09-09 at 10.20.08 PM.png



Depends if you are printing info, warning or error.



Also check settings of chrome console and select preserve logs:


Screen Shot 2017-09-09 at 10.24.22 PM.png



Thanks


Shruti


If the reply was informational, please like, mark as helpful or mark as correct!


lakshminarayan4
ServiceNow Employee

Hi,


You can place max 100 console.log statements per transaction ( like c.server.update statement ). After that system will refuse any log statements and place them in system logs. Unfortunately   this number is not exposed outside world . so you can't modify this number.



Please Hit ✅Correct, ��Helpful, or ��Like depending on the impact of the response



Thanks


- YLN