Skip to content
Back

How to Log in development environment

  • 0
  • Self Hosted
  • Tools
Ketan
12 May, 2024, 06:27

I want to log a variable in development environment so I just imported in app/controllers/api/teams.php

TypeScript
use Utopia\CLI\Console;
TypeScript
App::get('/v1/teams')
....
->actions(....
  Console::success("testing");

But this isn't logging anything whenever I go to localhost/v1/teams

I am checking the logs via docker compose logs -f

TL;DR
To log a variable in the development environment, the developer needs to import `Utopia\CLI\Console` and use `Console::success("testing")` to log the variable. If the log is not displaying while accessing `localhost/v1/teams`, check the logs using `docker compose logs -f`.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more