aboutsummaryrefslogtreecommitdiffhomepage
path: root/main.go
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2017-12-15 18:55:57 -0800
committerGravatar Frédéric Guillot <fred@miniflux.net>2017-12-15 18:55:57 -0800
commit1d8193b892bf63db6b91c66b9d048873bf1bc4cf (patch)
tree4ca54691f7fab88f73f657f005e26d75ae5f0058 /main.go
parentc6d9eb361454b70406cf6573b284d5e99ba3a2d2 (diff)
Add logger
Diffstat (limited to 'main.go')
-rw-r--r--main.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/main.go b/main.go
index 306ac64..02f53c0 100644
--- a/main.go
+++ b/main.go
@@ -18,7 +18,6 @@ import (
"context"
"flag"
"fmt"
- "log"
"os"
"os/signal"
"runtime"
@@ -26,6 +25,7 @@ import (
"time"
"github.com/miniflux/miniflux/config"
+ "github.com/miniflux/miniflux/logger"
"github.com/miniflux/miniflux/model"
"github.com/miniflux/miniflux/reader/feed"
"github.com/miniflux/miniflux/scheduler"
@@ -38,7 +38,7 @@ import (
)
func run(cfg *config.Config, store *storage.Storage) {
- log.Println("Starting Miniflux...")
+ logger.Info("Starting Miniflux...")
stop := make(chan os.Signal, 1)
signal.Notify(stop, os.Interrupt)
@@ -55,11 +55,11 @@ func run(cfg *config.Config, store *storage.Storage) {
)
<-stop
- log.Println("Shutting down the server...")
+ logger.Info("Shutting down the server...")
ctx, _ := context.WithTimeout(context.Background(), 5*time.Second)
server.Shutdown(ctx)
store.Close()
- log.Println("Server gracefully stopped")
+ logger.Info("Server gracefully stopped")
}
func askCredentials() (string, string) {