improving logging (#5)

* small refactoring of error messages

* (very) small refactoring of structs instantiation

* improving logging with debug messages

* using INFO level as default + changing previous debug message to info message
This commit is contained in:
Julien Neuhart
2018-05-04 17:43:19 +02:00
committed by GitHub
parent 810d35ffbe
commit 2871fb1ffe
30 changed files with 1275 additions and 61 deletions

View File

@@ -53,8 +53,9 @@ func main() {
Handler: r,
}
logger.Infof("Starting Gotenberg version %s", version)
logger.Infof("Listening on port %s", config.GetPort())
logger.Debugf("configuration loaded from file %s", defaultConfigurationFilePath)
logger.Infof("starting Gotenberg version %s", version)
logger.Infof("listening on port %s", config.GetPort())
// runs our server in a goroutine so that it doesn't block.
go func() {
@@ -83,6 +84,6 @@ func main() {
s.Shutdown(ctx)
logger.SetLevel(logrus.InfoLevel)
logger.Info("Bye!")
logger.Info("bye!")
os.Exit(0)
}