0.2.0 #10

Manually merged
xdrm-brackets merged 43 commits from 0.2.0 into master 2020-03-08 15:28:42 +00:00
2 changed files with 5 additions and 5 deletions
Showing only changes of commit 6bc8160f99 - Show all commits

View File

@ -46,7 +46,7 @@ func New(configPath string) (*Server, error) {
}
// 4. log configuration services
log.Printf("=== Aicra configuration ===\n")
log.Printf("🔧 Reading configuration '%s'\n", configPath)
logService(*i.services, "")
return i, nil
@ -68,9 +68,9 @@ func (s *Server) Handle(handler *api.Handler) {
func (s Server) HTTP() httpServer {
// 1. log available handlers
log.Printf("=== Mapped handlers ===\n")
log.Printf("🔗 Mapping handlers\n")
for i := 0; i < len(s.handlers); i++ {
log.Printf("* [rest] %s\t'%s'\n", s.handlers[i].GetMethod(), s.handlers[i].GetPath())
log.Printf(" ->\t%s\t'%s'\n", s.handlers[i].GetMethod(), s.handlers[i].GetPath())
}
// 2. cast to http server

View File

@ -90,9 +90,9 @@ func logService(s config.Service, path string) {
for _, method := range handledMethods {
if m := s.Method(method); m != nil {
if path == "" {
log.Printf("* [rest] %s\t'/'\n", method)
log.Printf(" ->\t%s\t'/'\n", method)
} else {
log.Printf("* [rest] %s\t'%s'\n", method, path)
log.Printf(" ->\t%s\t'%s'\n", method, path)
}
}
}