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

print version on start #319

Merged
merged 2 commits into from
Feb 22, 2019
Merged

print version on start #319

merged 2 commits into from
Feb 22, 2019

Conversation

Lagovas
Copy link
Collaborator

@Lagovas Lagovas commented Feb 21, 2019

added logging version at start. it looks now like that:

INFO[0000] Starting service acra-server [pid=591]        version=0.84.2
INFO[2019-02-21T14:46:00+02:00] Validating service configuration...
...

@@ -209,7 +209,7 @@ type Config struct {
}

func main() {
log.Infof("Starting service %v [pid=%v]", ServiceName, os.Getpid())
log.WithField("version", utils.VERSION).Infof("Starting service %v [pid=%v]", ServiceName, os.Getpid())
Copy link
Contributor

Choose a reason for hiding this comment

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

Hm... Why add version as a field but keep service name and PID just a part of the log string?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

hm... I don't know what to say) legacy version vs new version)) All our components log at startup like Starting service BLABLA [pid=123] and only 3 (server/connector/translator) works as a daemon and good to log version for them. So used field to log instead raw string format

@Lagovas Lagovas merged commit 417e1bd into cossacklabs:master Feb 22, 2019
@Lagovas Lagovas deleted the lagovas/T1001-print-version-on-start branch February 26, 2019 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants