gofr-dev / gofr

An opinionated GoLang framework for accelerated microservice development. Built in support for databases and observability.
https://gofr.dev
Apache License 2.0
3.6k stars 236 forks source link

Detailed Logs for Static File Server #1229

Open aryanmehrotra opened 2 days ago

aryanmehrotra commented 2 days ago

I tried adding a static file server, but I didn't get any logs when the path was wrong, and no endpoints were registered from the directory.

I would need to get inside the code and figure out that the path should start with ./

May be ./ can be automatically added or Debug logs should be present to debug easier without going inside the code.

Screenshot 2024-11-20 at 12 10 35 PM
shashank-zopsmart commented 1 day ago

Can you please tell the way to reproduce this issue as when I was trying with one of the examples present in Gofr repo, I got error level log

Screenshot 2024-11-20 at 7 23 16 PM
Umang01-hash commented 1 day ago

@shashank-zopsmart as shown in the issue description you need to create a directory and then give it's path to our app.AddStaticFiles method.

Kindly refer to this documentation: https://github.com/gofr-dev/gofr/blob/development/docs/advanced-guide/serving-static-files/page.md

shashank-zopsmart commented 1 day ago

@Umang01-hash I tried following scenarios: