Skip to content

Commit

Permalink
Migrate examples to zap RC
Browse files Browse the repository at this point in the history
  • Loading branch information
Akshay Shah committed Feb 23, 2017
1 parent 34dc69a commit 5b09b2b
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions examples/keyvalue/server/observer.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@
package main

import (
"context"

"go.uber.org/fx/service"
"go.uber.org/fx/ulog"
"go.uber.org/zap"
)

// Observer receives callbacks during various service lifecycle events
Expand All @@ -37,7 +35,7 @@ type Observer struct {

// OnInit is called during service init process. Returning an error halts the init?
func (o *Observer) OnInit(svc service.Host) error {
ulog.Logger(context.Background()).Info(
zap.S().Info(
"Received service init callback",
"service_name", o.Name(),
"some_number", o.ServiceConfig.SomeNumber,
Expand Down

0 comments on commit 5b09b2b

Please sign in to comment.