Fix example for altered Logging interface.

This commit is contained in:
Daniel Theophanes
2013-03-04 17:29:32 -08:00
parent 5edef41036
commit f23a9c357e
+5 -5
View File
@@ -6,7 +6,7 @@ import (
"os" "os"
) )
var localLog service.Logger var log service.Logger
func main() { func main() {
var name = "GoServiceTest" var name = "GoServiceTest"
@@ -14,7 +14,7 @@ func main() {
var desc = "This is a test Go service. It is designed to run well." var desc = "This is a test Go service. It is designed to run well."
var s, err = service.NewService(name, displayName, desc) var s, err = service.NewService(name, displayName, desc)
localLog = s log = s
if err != nil { if err != nil {
fmt.Printf("%s unable to start: %s", displayName, err) fmt.Printf("%s unable to start: %s", displayName, err)
@@ -68,14 +68,14 @@ func main() {
return nil return nil
}) })
if err != nil { if err != nil {
s.LogError(err.Error()) s.Error(err.Error())
} }
} }
func doWork() { func doWork() {
localLog.LogInfo("I'm Running!") log.Info("I'm Running!")
select {} select {}
} }
func stopWork() { func stopWork() {
localLog.LogInfo("I'm Stopping!") log.Info("I'm Stopping!")
} }