diff --git a/CHANGELOG.md b/CHANGELOG.md index 460a052..9a6789b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] - xxxx-xx-xx ### Added - [#20](https://github.com/elyby/chrly/issues/20): Print hostname in the `version` command output. +- [#21](https://github.com/elyby/chrly/issues/21): Print Chrly's version during server startup. ### Fixed - [#22](https://github.com/elyby/chrly/issues/22): Correct version passing during building of the Docker image. diff --git a/http/http.go b/http/http.go index 2fb4f0d..baa9621 100644 --- a/http/http.go +++ b/http/http.go @@ -13,6 +13,7 @@ import ( "github.com/mono83/slf/wd" "github.com/elyby/chrly/dispatcher" + v "github.com/elyby/chrly/version" ) type Emitter interface { @@ -20,6 +21,8 @@ type Emitter interface { } func StartServer(server *http.Server, logger slf.Logger) { + logger.Debug("Chrly :v (:c)", wd.StringParam("v", v.Version()), wd.StringParam("c", v.Commit())) + done := make(chan bool, 1) go func() { logger.Info("Starting the server, HTTP on: :addr", wd.StringParam("addr", server.Addr))