Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detailed Logs for Static File Server #1229

Open
aryanmehrotra opened this issue Nov 20, 2024 · 3 comments
Open

Detailed Logs for Static File Server #1229

aryanmehrotra opened this issue Nov 20, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@aryanmehrotra
Copy link
Member

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
@aryanmehrotra aryanmehrotra added the enhancement New feature or request label Nov 20, 2024
@shashank-zopsmart
Copy link

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
Copy link
Contributor

Umang01-hash commented Nov 21, 2024

@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
Copy link

@Umang01-hash I tried following scenarios:

  • Path (out), Directory (not present): Got error log signifying that route was not registered
  • Path (./out), Directory (not present): Got error log signifying that route was not registered
  • Path (out), Directory (present): Everything worked fine
  • Path (./out), Directory (present): Everything worked fine

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants