Commit 1fd7fa5d authored by Wang-Kai's avatar Wang-Kai

make example runable

parent 0f730505
...@@ -25,15 +25,15 @@ import ( ...@@ -25,15 +25,15 @@ import (
Then init a Log (example with console adapter) Then init a Log (example with console adapter)
```golang ```golang
log := NewLogger(10000) log := logs.NewLogger(10000)
log.SetLogger("console", "") log.SetLogger("console", "")
``` ```
> the first params stand for how many channel > the first params stand for how many channel
Use it like this: Use it like this:
```golang ```golang
log.Trace("trace") log.Trace("trace")
log.Info("info") log.Info("info")
log.Warn("warning") log.Warn("warning")
...@@ -44,8 +44,8 @@ log.Critical("critical") ...@@ -44,8 +44,8 @@ log.Critical("critical")
## File adapter ## File adapter
Configure file adapter like this: Configure file adapter like this:
```golang ```golang
log := NewLogger(10000) log := NewLogger(10000)
log.SetLogger("file", `{"filename":"test.log"}`) log.SetLogger("file", `{"filename":"test.log"}`)
``` ```
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment