Add version number to ntfy serve output
This commit is contained in:
@@ -94,6 +94,7 @@ type Config struct {
|
||||
VisitorEmailLimitReplenish time.Duration
|
||||
BehindProxy bool
|
||||
EnableWeb bool
|
||||
Version string // injected by App
|
||||
}
|
||||
|
||||
// NewConfig instantiates a default new server config
|
||||
@@ -135,5 +136,6 @@ func NewConfig() *Config {
|
||||
VisitorEmailLimitReplenish: DefaultVisitorEmailLimitReplenish,
|
||||
BehindProxy: false,
|
||||
EnableWeb: true,
|
||||
Version: "",
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,7 +180,7 @@ func (s *Server) Run() error {
|
||||
if s.config.SMTPServerListen != "" {
|
||||
listenStr += fmt.Sprintf(" %s[smtp]", s.config.SMTPServerListen)
|
||||
}
|
||||
log.Info("Listening on%s, log level is %s", listenStr, log.CurrentLevel().String())
|
||||
log.Info("Listening on%s, ntfy %s, log level is %s", listenStr, s.config.Version, log.CurrentLevel().String())
|
||||
mux := http.NewServeMux()
|
||||
mux.HandleFunc("/", s.handle)
|
||||
errChan := make(chan error)
|
||||
|
||||
Reference in New Issue
Block a user