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

ReportCaller only includes the very last part of the package name #22

Closed
sazzer opened this issue Feb 24, 2023 · 0 comments · Fixed by #43
Closed

ReportCaller only includes the very last part of the package name #22

sazzer opened this issue Feb 24, 2023 · 0 comments · Fixed by #43
Labels
enhancement New feature or request

Comments

@sazzer
Copy link

sazzer commented Feb 24, 2023

I've just come across this library, and it's great. However, the SetReportCaller option seems to only report the very last part of the package name. That is, if the log statement was in a file called get.go in the package github.com/example/domains/users/handlers then the log message would state handlers/get.go without giving the full context.

That's fine for smaller programs, but once you get beyond a certain size it becomes less helpful. E.g., I might have a program that has several subdomains, each of which contains a .../handlers/get.go file, and the logs wouldn't distinguish which one the message came from.

Cheers

@aymanbagabas aymanbagabas added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Feb 24, 2023
aymanbagabas added a commit that referenced this issue Mar 8, 2023
Format caller source file, line and function name.

Fixes: #22
aymanbagabas added a commit that referenced this issue Mar 20, 2023
Format caller source file, line and function name.

Fixes: #22
Malanris pushed a commit to Malanris/plog that referenced this issue Jul 29, 2024
Format caller source file, line and function name.

Fixes: charmbracelet/log#22
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
2 participants