update: remove fiber's log module

This commit is contained in:
ngn
2024-03-19 23:11:43 +03:00
parent d0fd8f2b0a
commit 756ba61b23
4 changed files with 21 additions and 13 deletions

14
main.go
View File

@ -1,7 +1,7 @@
/*
* tracker | MatterLinux Package Tracker
* MatterLinux 2023-2024 (https://matterlinux.xyz)
* tracker | MatterLinux Package Tracker
* MatterLinux 2023-2024 (https://matterlinux.xyz)
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -16,17 +16,17 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
*/
package main
import (
"log"
"strings"
"time"
"git.matterlinux.xyz/matter/tracker/lib"
"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/log"
"github.com/gofiber/template/html/v2"
)
@ -95,6 +95,8 @@ func GETIndex(c *fiber.Ctx) error {
}
func main(){
log.SetFlags(log.Ltime | log.Lshortfile)
engine := html.New("./templates", ".html")
app := fiber.New(fiber.Config{
DisableStartupMessage: true,
@ -109,10 +111,10 @@ func main(){
})
go UpdateLoop()
log.Info("Starting MatterLinux Package Tracker on port 9877")
log.Println("Starting MatterLinux Package Tracker on port 9877")
err := app.Listen(":9877")
if err != nil {
log.Errorf("Error starting server: %s", err)
log.Printf("Error starting server: %s", err)
}
close(stopchan)
}