Select to view content in your preferred language

Turn off the console logs from ArcGIS JavaScript API

1340
4
01-28-2013 07:03 PM
RahulMetangale1
Frequent Contributor
Hi All,

I am using ArcGIS JavaScript API 2.8 and found that there are many warnings logged to the console. Because of this the messages I am logging to console are becoming difficult to identify.

Is there any way to turn off these API logs?

Any help is greatly appreciated.

Thanks!
0 Kudos
4 Replies
derekswingley1
Deactivated User
Can you provide an example of the log/warning messages you're seeing?

Browser dev tools provide the ability to filter the messages you see. The default is to see all messages/logs/warnings/errors. You could click the button to see only "Logs" (in Chrome Dev tools) and you'll only see console.log messages.
0 Kudos
RahulMetangale1
Frequent Contributor
Thank you! Thant make sense. The logs I was seeing fall under debug Info category. I have attached the screen shot for your reference. Is there any way to disable these debug logs in production?[ATTACH=CONFIG]21196[/ATTACH]
0 Kudos
StephenLead
Honored Contributor
Is there any way to disable these debug logs in production?


That would be like putting masking tape over the "low oil" warning light 😉

Why not fix the errors? It's likely that in ArcMap, you have switched off the SHAPE field before publishing this layer to ArcGIS Server, so the SHAPE field isn't accessible to the JS API.

Go to your layer's REST endpoint (eg http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/WaterTemplate/LocalGovernmentInfrastructu...) and verify that the SHAPE field is shown. If not, switch it on in ArcMap and republish this layer.

Steve
0 Kudos
RahulMetangale1
Frequent Contributor
Hi Steve,

Thank you for the reply. I should have mentioned this before, I am using custom web services(written in Java Grails) based on ArcGIS REST specification. I can not add geometry field in it.

Thanks,
Rahul
0 Kudos