API calls used for Logging

I noticed that every time my application calls a Cloud Code, instead of 1 call I get 3 calls, 1 for the client calling the Cloud Code, one for the Cloud Code to execute a transaction, then one called by the Cloud Code for the Log Service.

Except I don’t have any logging code in my Cloud Code service and in addition I turned off logging platform wide.

Do the logging API calls still count towards my total usage? If so, then going from client side code to server side increased my API count 3x. Any suggestions in how to reduce?

Hi @Bob_Leung,

You get 1 additional API call at the end of business logic execution because js coderunner flush logs to the developer’s repo. We have a ticket - BKNDLSS-24588, to redesign our approach to not count this additional call.

As for now, please set the level of logging for SERVER_CODE to OFF

Regards,
Marina

Is this the correct setting? When I tried it, the logging event is still triggered.

@Bob_Leung, yes it is there. I have created a ticket for the team to look closer at it- BKNDLSS-33573.
As for now, please do the next:

  • Set the Application-wide log level to all;
  • Invoke the API service (The SERVER_CODE log will be created);
  • Set the log level to OFF for the SERVER_CODE;

Regards,
Marina

Done. Will report back if the server logging persists.

1 Like

Hi @Bob_Leung,

We have fixed the issue reported above (BKNDLSS-33573) where SERVER_CODE logs were logged despite being disabled. If you have a chance to test this on your side, please let us know if the fix works for you.

Regards,
Marina