Platform

Logs

9min

Parse Server Logs

Introduction

In this guide, you will learn about the logs that you can find at the Back4App dashboard.

Goal

  • Understand the logs:
  • System
  • Info
  • Error
  • Access

Prerequisites

There are no pre-requisites to read this page.

Logs

Searching for logs? You’re in the right place :)

Logs are essential for development or production apps, it is an important way to understand what is happening with an aggregate output of the running processes. You must be able to track the app’s behaviors.

Application event logging is critical for understanding the requests and identifying possible loops or bugs in your code.

You can check them at the left menu, on Cloud Code > Logs. It looks like the image below:

Document image


System

The System Log shows the logs of console.log() and console.error() and all general logs of everything that happens with your app.

Info

Here will appear the warnings about Cloud Code functions and triggers, as well as Live Query status.

Error

Errors related to your Cloud Code functions or the database.

Access

This block contains information about the requests that are coming into the server. The information is essential to understand where the data is being accessed from, as well as how it’s being accessed, by whom, and the status of requests.

Sample Logs

Here you can find some examples of Back4App Logs:

System

1 (node:19) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated 2 (node:19) DeprecationWarning: The option `reconnectInterval` is incompatible with the unified topology, please read more by visiting http://bit.ly/2D8WfT6 3 (node:18) DeprecationWarning: The option `reconnectTries` is incompatible with the unified topology, please read more by visiting http://bit.ly/2D8WfT6

At Back4App, the parse-cache module is set by default at versions higher than 2.8.4. Therefore, it’s also possible to see some warnings from Parse Server initialization:

1 Using redis cache for query.cache() methods 2 Using memory cache for query.cache() methods 3 The server is listening on port 3000

Cloud code syntax errors:

1 Warning: main.js not found: to run any cloud code functions you need first to create a main.js file 2 Error loading your cloud code: 3 /usr/src/app/data/cloud/main.js:186

And also console.log from Cloud Code triggers:

1 This is the log from beforeSave trigger

Info

When the Server URL and Live Query are enabled for a class, a message will appear in this section:

1 Parse LiveQuery Server starts running

Calling a Cloud Code function will also be logged here:

1 Ran cloud function helloWorld for user undefined with: 2 Input: {}

Running a Cloud Code function without a return statement:

1 Ran cloud function helloWorld for user undefined with: 2 Input: {} 3 Result: undefined

Error

Timeout errors:

1 Uncaught internal server error. timeout of 1000ms exceeded

Cloud Code triggers errors (see the example below):

Markdown


Access

Markdown


After the endpoints, we can verify the response status code. Check some examples below:

Markdown


Calling Cloud Code functions will appear here too:

Markdown