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
proposal: log: add flag to print file names relative to current directory #27847
Comments
Relative to what? The working directory of the process? The working directory of the editor? What if either change during the execution of the program? |
good point.
In reality when you run the binary in foreground you can't change the terminal directory anyway and when you run it in background this is even less relevant, no? |
I understand the rationale but it seems a bit surprising and special purpose. /cc @robpike |
I agree with @rsc and would prefer not to do this. It seems too likely to confuse. |
got it . |
many terminals allow clickable paths to open the file in the default editor and all recognise relative paths.
I propose to add a flag to show a relative path :
Lrelativefile
inhttps://golang.org/pkg/log/#pkg-constants
Using
Llongfile
renders the log lines too long and in most cases wraps the text in more than a single line.The text was updated successfully, but these errors were encountered: