Skip to content

peramic/logging

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

logging

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))
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages