All Collections
Features and APIs
How do I view brainCloud logs?
How do I view brainCloud logs?

Viewing brainCloud logs, and enabling client logging...

Paul Winterhalder avatar
Written by Paul Winterhalder
Updated over a week ago

brainCloud provides a bunch of different logs that are useful in debugging your apps. Here is a quick explainer:

  • Recent Errors - these are the main logs. They mostly show client API errors - but they also include warning and more general info messages. All calls to the Logging service appear here as well.

  • Unreadable Requests - these are client API requests that your app sent into our servers, but we were unable to process them for some reason (normally because the request wasn't fully received or properly formed)

  • Server Logs - these are mostly S2S and webhook requests sent from your custom servers to the S2S API.

  • User Request + Response Logs - these logs are individual requests + responses sent/received for an individual user.

  • Client Logs - some brainCloud clients also keep a log for requests sent and responses received.

  • Debug Logs - you can also view logs directly with responses in the API Explorer and Cloud Code Editor run window. These logs also support an additional Debug log level (that doesn't get recorded otherwise).

More information on individual log types follow...

---

Recent Errors (under Monitoring | Global Monitoring)

Normally this is the first place to look to view the health of your app. Here you will find any recent errors and warnings that the system has logged against your app - generally in association with a Client API or S2S API call that was being made at the time.

Note that you can choose to view Error, Warning and Info log levels. Info logs are turned off by default.

Pro-tips:

  • If you click on an entry in the Profile column, you'll jump to the Request + Response log for that user

  • To view more of the same type of error, choose Filter to this operation from the action menu

  • You can view a summary of Error counts (by service + operation) on the Reporting | API Errors screen. Note - it is limited to Client API errors.

  • You can send custom errors to this view via the Cloud Code Logging service and/or logging convenience methods on the Cloud Code Bridge.

---

Server Logs (under Monitoring | Global Monitoring)

The Server Logs show the requests into the Server-to-Server (S2S) API as well as incoming WebHooks.

These logs are especially useful when trying to understand the incoming data formats of webhook-based integrations with external services.


---

User Request + Response Logs (via Monitoring | User Monitoring | Logs

To really dive into the details, its useful to examine the request + response logs for a particular user. To do that, go to User Monitoring, search for your user, and then go to the Logs section.

You will see the messages sent to and from brainCloud, arranged by packet or bundle (which is a group of requests sent together to conserve network bandwidth). Clicking on they "eye" beside the packet id displays the information that was sent to brainCloud, and clicking on the "eye" on the right-hand side shows the response.

Pro-tips:

  • You can also Export these logs for offline viewing.

  • These logs disappear quickly (i.e. within 24-48 hours) - so export them when you can!

---

Client Logs

If you are an app developer, you can turn on client logging and view exactly what your client is sending and receiving from brainCloud.

Client logging is enabled by calling EnableLogging()  on the brainCloud Client object. This can be especially useful when reporting an issue to our support team.

Pro-tip: Unity users can also enable client logging via the brainCloud IDE plug-in.


---

Debug Logs

Finally, for convenience when using the API Explorer and/or Cloud Code Editor, brainCloud now displays any log messages generated by your scripts in the console log that contains the script results.

Each message is displayed with a unique icon indicating the log level, and you can expand the entries for additional context info.

Note also that Debug-level log messages are only displayed in this view - they don't get sent to the persistant logs.

---

We hope that helps, and happy coding!

Your feedback is important to us. Please rate this response below. Thanks! 

Did this answer your question?