Docs Menu

View Logs with Realm CLI

On this page

  • View Recent Logs
  • Tail Logs in Real Time
  • View Error Logs
  • Filter Logs by Type
  • View Logs for a Date Range

To return the 100 most recent log entries for your application, run realm-cli logs list.

realm-cli logs list

You can use the --tail flag to open a stream that displays application logs as they come in.

realm-cli logs list --tail

You can use the --errors flag to view only error logs. If you don't specify the flag, the command returns both error logs and regular logs.

realm-cli logs list --errors

You can use the --type flag to view logs of one or more specific types. If you don't specify a type, the command returns logs of all types.

The following types are valid:

  • auth
  • function
  • push
  • service
  • trigger
  • graphql
  • sync
  • schema
realm-cli logs list --type=function --type=trigger

You can use the --start and --end flags to view logs from a range of dates. The flags accept ISODate strings and you can use them separately or together.

realm-cli logs list --start="2021-01-01T00:00:00.000+0000" --end="2021-02-01T00:00:00.000+0000"
←  Access Logs with the Admin APIForward Logs to a Service →
Give Feedback
© 2022 MongoDB, Inc.

About

  • Careers
  • Investor Relations
  • Legal Notices
  • Privacy Notices
  • Security Information
  • Trust Center
© 2022 MongoDB, Inc.