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

Emit the server software and version to the log on startup #168

Merged
merged 1 commit into from Aug 22, 2019

Conversation

OddBloke
Copy link
Contributor

@OddBloke OddBloke commented Aug 10, 2019

As suggested (by me) in https://discuss.write.as/t/log-the-writefreely-version-on-startup/763

This follows the same format as writefreely -v, so also refactors OutputVersion() to use a new FormatVersion() function.


  • I have signed the CLA

@thebaer
Copy link
Member

thebaer commented Aug 10, 2019

Thanks for contributing this! Good idea, and simple enough fix.

My only feedback is that I think the log.Info() call should happen inside main() (in cmd/writefreely/main.go) instead of writefreely.Initialize(). That would keep the writefreely package flexible, and prevents logging the wrong software name / version if it's ever used for other kinds of executables. What do you think?

@OddBloke
Copy link
Contributor Author

@thebaer Thanks for the review! I agree, and have made the change.

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@OddBloke
Copy link
Contributor Author

Anything else I can do to push this forward?

@thebaer
Copy link
Member

thebaer commented Aug 22, 2019

Just wanted to run it myself -- all good! Thanks for contributing this!

@thebaer thebaer merged commit de7acb5 into writefreely:develop Aug 22, 2019
@OddBloke
Copy link
Contributor Author

OddBloke commented Aug 22, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants