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 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

This comment has been minimized.

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 OddBloke force-pushed the OddBloke:log-version branch from 4aae13c to 7a53af3 Aug 11, 2019
@OddBloke

This comment has been minimized.

Copy link
Contributor Author

OddBloke commented Aug 11, 2019

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

Copy link
Member

robjloranger left a comment

👍

@OddBloke

This comment has been minimized.

Copy link
Contributor Author

OddBloke commented Aug 22, 2019

Anything else I can do to push this forward?

@thebaer

This comment has been minimized.

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 writeas:develop Aug 22, 2019
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@OddBloke

This comment has been minimized.

Copy link
Contributor Author

OddBloke commented Aug 22, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.