package main
import (
"errors"
"net/http"
"github.com/peramic/logging"
app "./go"
)
var log *logging.Logger
func main() {
log = logging.GetLogger("myApp")
app.AddRoutes(logging.LogRoutes)
log.Info("Server started")
log.Error("Something got wrong")
//log actual error true
err:=errors.New("erors")
log.WithError(err).Fatal("Something got wrong")
router := app.NewRouter()
log.Fatal(http.ListenAndServe(":8080", router))
}
-
Notifications
You must be signed in to change notification settings - Fork 0
License
peramic/logging
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published