Skip to content

Developer's guide to monitoring & logging

Roni bhakta edited this page Mar 1, 2026 · 2 revisions

Monitoring and Logging

Lenny's services run inside Docker containers. You can monitor the application logs using standard Docker commands.

Application Logs

To view the output of the FastAPI application (or any other container), use the docker logs command's custom make commands:

# Follow all docker internal contianer log's in one place.
make log
# Follow logs for the API and Nginx container
docker logs -f lenny_api

# Follow logs for the Database
docker logs -f lenny_db

# Follow logs for the Next.js Reader
docker logs -f lenny_reader

Tip

Append --tail 100 to limit the output to the last 100 lines.

Nginx Request Logs Nginx operates within the lenny_api container and acts as the reverse proxy. Nginx writes its access and error logs directly to the container's file system rather than the standard output.

To view Nginx routing and access streams live, you must execute a command inside the running container:

Access Logs:

docker exec -it lenny_api tail -f /var/log/nginx/access.log

Error Logs (Debug level enabled):

docker exec -it lenny_api tail -f /var/log/nginx/error.log

This covers both standard container logs and the specific Nginx logs inside the API container!

Clone this wiki locally