Skip to content

Commit 2d555d9

Browse files
committed
Resolves #20. Print Chrly's version during server startup.
1 parent dbefac0 commit 2d555d9

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77
## [Unreleased] - xxxx-xx-xx
88
### Added
99
- [#20](https://github.com/elyby/chrly/issues/20): Print hostname in the `version` command output.
10+
- [#21](https://github.com/elyby/chrly/issues/21): Print Chrly's version during server startup.
1011

1112
### Fixed
1213
- [#22](https://github.com/elyby/chrly/issues/22): Correct version passing during building of the Docker image.

http/http.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,16 @@ import (
1313
"github.com/mono83/slf/wd"
1414

1515
"github.com/elyby/chrly/dispatcher"
16+
v "github.com/elyby/chrly/version"
1617
)
1718

1819
type Emitter interface {
1920
dispatcher.Emitter
2021
}
2122

2223
func StartServer(server *http.Server, logger slf.Logger) {
24+
logger.Debug("Chrly :v (:c)", wd.StringParam("v", v.Version()), wd.StringParam("c", v.Commit()))
25+
2326
done := make(chan bool, 1)
2427
go func() {
2528
logger.Info("Starting the server, HTTP on: :addr", wd.StringParam("addr", server.Addr))

0 commit comments

Comments
 (0)