Skip to content

Commit

Permalink
updated example on the README file
Browse files Browse the repository at this point in the history
  • Loading branch information
steenzout committed Nov 24, 2015
1 parent e2c30e3 commit 7eded4d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,23 @@ import (
manager_simple "github.com/mediaFORGE/gol/managers/simple"
)
// LogWorkers the number of log message workers.
const LogWorkers = 4
// Log holds the application LogManager instance.
var Log gol.LoggerManager
func init() {
fmt.Println("init():start")
Log = manager_simple.New(LogWorkers)
Log = manager_simple.New()
f := filter_severity.New(field_severity.Info)
formatter := formatters.Text{}
logger := logger_simple.New(f, formatter, os.Stdout)
Log.Register("main", logger)
Log.Run()
channel := make(chan *gol.LogMessage, 10)
Log.Run(channel)
Log.Send(gol.NewInfo("message", "main.Log has been configured"))
channel <- gol.NewInfo("message", "this message was sent directly to the log manager channel")
fmt.Println("init():end")
}
Expand Down

0 comments on commit 7eded4d

Please sign in to comment.