Skip to content

Commit

Permalink
Use micrologger (#82)
Browse files Browse the repository at this point in the history
* vendor: add micrologger

* Remove logger package

* Use micrologger
  • Loading branch information
rossf7 authored Aug 3, 2017
1 parent b7202f1 commit 2d2b437
Show file tree
Hide file tree
Showing 93 changed files with 1,670 additions and 6,117 deletions.
4 changes: 2 additions & 2 deletions command/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
package command

import (
"github.com/giantswarm/micrologger"
"github.com/spf13/cobra"
"github.com/spf13/viper"

"github.com/giantswarm/microerror"
"github.com/giantswarm/microkit/command/daemon"
"github.com/giantswarm/microkit/command/version"
"github.com/giantswarm/microkit/logger"
)

// Config represents the configuration used to create a new root command.
type Config struct {
// Dependencies.
Logger logger.Logger
Logger micrologger.Logger
ServerFactory daemon.ServerFactory

// Settings.
Expand Down
8 changes: 4 additions & 4 deletions command/daemon/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import (
"os/signal"
"sync"

"github.com/giantswarm/microerror"
"github.com/giantswarm/micrologger"
"github.com/spf13/cobra"
"github.com/spf13/viper"

"github.com/giantswarm/microerror"
"github.com/giantswarm/microkit/command/daemon/flag"
microflag "github.com/giantswarm/microkit/flag"
"github.com/giantswarm/microkit/logger"
"github.com/giantswarm/microkit/server"
)

Expand All @@ -23,7 +23,7 @@ var (
// Config represents the configuration used to create a new daemon command.
type Config struct {
// Dependencies.
Logger logger.Logger
Logger micrologger.Logger
ServerFactory ServerFactory

// Settings.
Expand Down Expand Up @@ -88,7 +88,7 @@ func New(config Config) (Command, error) {

type command struct {
// Dependencies.
logger logger.Logger
logger micrologger.Logger
serverFactory ServerFactory

// Internals.
Expand Down
14 changes: 8 additions & 6 deletions glide.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions glide.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ import:
version: 3.2.1
- package: golang.org/x/text
version: 4ee4af566555f5fbe026368b75596286a312663a
- package: github.com/giantswarm/micrologger
version: master
12 changes: 0 additions & 12 deletions logger/error.go

This file was deleted.

5 changes: 2 additions & 3 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"sync"
"time"

"github.com/giantswarm/micrologger"
kitendpoint "github.com/go-kit/kit/endpoint"
kithttp "github.com/go-kit/kit/transport/http"
"github.com/gorilla/mux"
Expand All @@ -21,8 +22,6 @@ import (
"github.com/tylerb/graceful"

"github.com/giantswarm/microerror"
"github.com/giantswarm/microkit/logger"
micrologger "github.com/giantswarm/microkit/logger"
"github.com/giantswarm/microkit/tls"
"github.com/giantswarm/microkit/transaction"
microtransaction "github.com/giantswarm/microkit/transaction"
Expand Down Expand Up @@ -196,7 +195,7 @@ func New(config Config) (Server, error) {
type server struct {
// Dependencies.
errorEncoder kithttp.ErrorEncoder
logger logger.Logger
logger micrologger.Logger
router *mux.Router
transactionResponder transaction.Responder

Expand Down
3 changes: 2 additions & 1 deletion transaction/executer.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import (
"fmt"

"github.com/giantswarm/microerror"
micrologger "github.com/giantswarm/microkit/logger"
"github.com/giantswarm/micrologger"

microstorage "github.com/giantswarm/microkit/storage"
transactionid "github.com/giantswarm/microkit/transaction/context/id"
)
Expand Down
3 changes: 2 additions & 1 deletion transaction/responder.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ import (
"fmt"

"github.com/giantswarm/microerror"
micrologger "github.com/giantswarm/microkit/logger"
"github.com/giantswarm/micrologger"

microstorage "github.com/giantswarm/microkit/storage"
)

Expand Down
11 changes: 5 additions & 6 deletions vendor/github.com/giantswarm/microerror/errgo_handler.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions vendor/github.com/giantswarm/microerror/errgo_handler_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions vendor/github.com/giantswarm/microerror/error_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 2d2b437

Please sign in to comment.