What is gs.info()?

Jacky Nguyen
Kilo Contributor

Hi Experts,

I have the questions about gs.info()?

  1. what is gs.info()?
  2. When to use gs.info()?
  3. when not to use gs.info()?
  4. Why we should use gs.info()?
  5. Best practice of coding gs.info()?

That is all question of me. Please explain it to help me.

Best regards,

 

 
1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

points below

  1. what is gs.info()? -it is used for logging messages to system logs
  2. When to use gs.info()? - it is widely used to debug the server side script in ServiceNow and mostly added to check script ran till which point
  3. when not to use gs.info()? - it should not be used in production instance; adding gs.info() for debugging is fine but remember to remove that before moving to production as it might lead to unnecessary system logs in production instance
  4. Why we should use gs.info()? - same as point 2
  5. Best practice of coding gs.info()? - refer below link

Technical Best Practices

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

9 REPLIES 9

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

points below

  1. what is gs.info()? -it is used for logging messages to system logs
  2. When to use gs.info()? - it is widely used to debug the server side script in ServiceNow and mostly added to check script ran till which point
  3. when not to use gs.info()? - it should not be used in production instance; adding gs.info() for debugging is fine but remember to remove that before moving to production as it might lead to unnecessary system logs in production instance
  4. Why we should use gs.info()? - same as point 2
  5. Best practice of coding gs.info()? - refer below link

Technical Best Practices

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@Chinh Nguyen 

Thank you for marking my response as helpful.

If my response helped you please mark it correct to close the question so that it benefits future readers as well.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

I thank you so much that spend time with me.

But I see still it doesn't completely enough so I mark for you helpful

Thanks,

 

@Chinh Nguyen 

Can you explain in detail what more details are required?

I believe most of the points are explained and few points are having links.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader