Skip to content

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


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.

3 participants