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

Open
wants to merge 1 commit into
base: develop
from

Conversation

@OddBloke
Copy link

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

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
Author

commented Aug 11, 2019

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

@robjloranger
Copy link
Member

left a comment

👍

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.