Improve logging
This commit is contained in:
parent
57903d4724
commit
ca9b6e05b7
10 changed files with 49 additions and 21 deletions
|
@ -20,6 +20,6 @@ func GetInfo(w http.ResponseWriter, r *http.Request) {
|
|||
|
||||
// GetVersionApi returns current app version.
|
||||
func GetVersionApi(w http.ResponseWriter, r *http.Request) {
|
||||
HandleWrite(w.Write([]byte(config.Info.Version)))
|
||||
HandleWrite(w.Write([]byte(config.Info.Version())))
|
||||
w.WriteHeader(http.StatusOK)
|
||||
}
|
||||
|
|
|
@ -74,6 +74,5 @@ func Serve() {
|
|||
r.Handle("/public/*", fs)
|
||||
|
||||
slog.Info("🌺 Website working", "port", config.Cfg.Port)
|
||||
slog.Debug("Debug mode enabled")
|
||||
log.Fatal(http.ListenAndServe(":"+strconv.Itoa(config.Cfg.Port), r))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue