Parse had a nice development command utility where you could read and stream logs.
Heroku has that, but it shows only Heroku logs, not Parse logs.
Is there some way to see a console.log
or console.error
statement now that we're all switching over to parse-server?
Parse Server is an open source backend that can be deployed to any infrastructure that can run Node. js. You can find the source on the GitHub repo. Parse Server uses MongoDB or PostgreSQL as a database.
Parse Server is an open source Backend-as-a-Service(BaaS) framework initially developed by Facebook. The platform now has an active and robust community of fanatical developers who constantly innovate and strive to improve the already impressive and modular platform.
If you use PM2
, it is really easy to see logs.
For my project, I have parse-server and parse-dashboard running on my server. Here is the PM2 config I use for them:
{
"apps": [
{
"script": "parse-server",
"args": "config/server.json",
"log_file": "logs/server.log",
"error_file": "logs/server-error.log",
"log_date_format" : "YYYY-MM-DD HH:mm:ss Z",
"instances": 1,
"watch": true,
"ignore_watch": ["cloud", "logs"],
"env": {
"VERBOSE": "1"
}
},
{
"script": "parse-dashboard",
"args": "--config config/dashboard.json",
"log_file": "logs/dashboard.log",
"error_file": "logs/dashboard-error.log",
"log_date_format" : "YYYY-MM-DD HH:mm:ss Z",
"instances": 1,
"watch": true,
"ignore_watch": ["cloud", "logs"]
}
]
}
In my case, it is the "VERBOSE": "1"
argument that allows me to see all the queries executed by parse-server.
If you want to see the logs of both parse-server and parse-dashboard, you then only have to type pm2 logs
.
In my configuration, parse-server and parse-dashboard are installed globally (npm install -g parse-server
and npm install -g parse-dashboard
).
The latest versions of Parse dashboard have Logs page out of the box
If you have Heroku CLI installed you can run these lines inside your project
heroku logs
for the last 100 lines or
heroku logs --tail
to show logs in real time
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With