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

log: document Print and Printf adding newlines more #47060

Closed
thalesfsp opened this issue Jul 5, 2021 · 3 comments
Closed

log: document Print and Printf adding newlines more #47060

thalesfsp opened this issue Jul 5, 2021 · 3 comments

Comments

@thalesfsp
Copy link

Ref.: #16564

Why not a flag (e.g.: log.Ldate) to disable that (newline)? What's the problem? Such change would be so easy to be implemented.

_Note: fmt isn't log, and log has everything needed minus this newline.

Thank you!

@ianlancetaylor
Copy link
Contributor

If you want complete control over output formatting, use the fmt package. If you want a simple way to generate logs, use the log package. There is no reason for the log package to provide all the capabilities of the fmt package.

I'll add that there a number of third party log packages out there, you aren't required to use the one in the standard library.

I'm going to close this issue because it doesn't add anything to the existing #16564, which was already closed.

@thalesfsp
Copy link
Author

Hello, @ianlancetaylor! I don't want complete control over output... I'm asking for just that: a flag...

@ianlancetaylor
Copy link
Contributor

Again, this issue doesn't add anything to the existing #16564. In general we don't want to continually revisit decisions that have already been made. Thanks.

@golang golang locked and limited conversation to collaborators Jul 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants