Skip to content

Commit

Permalink
update document
Browse files Browse the repository at this point in the history
  • Loading branch information
philchia committed Dec 22, 2016
1 parent d2076e5 commit b392019
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ import (
"runtime"
)

defer gol.Flush()
gol.Debug("Hello, gol!!!")
gol.Criticalf("Hello from %s", runtime.GOOS)

Expand All @@ -74,6 +75,7 @@ import (
"runtime"
)

defer gol.Flush()
gol.AddLogAdapter(file.NewAdapter("/var/log/tmp.log"))
gol.Debug("Hello, gol!!!")
gol.Criticalf("Hello from %s", runtime.GOOS)
Expand All @@ -88,6 +90,7 @@ import (
"runtime"
)

defer gol.Flush()
gol.SetLevel(gol.ERROR)
gol.Debug("Hello, gol!!!") // this will not print
gol.Criticalf("Hello from %s", runtime.GOOS)
Expand All @@ -102,6 +105,7 @@ import (
"runtime"
)

defer gol.Flush()
gol.SetOption(gol.Llongfile | gol.Ldate | gol.Ltime | gol.Lmicroseconds)
gol.Debug("Hello, gol!!!")
gol.Criticalf("Hello from %s", runtime.GOOS)
Expand All @@ -118,6 +122,7 @@ import (
"runtime"
)

defer gol.Flush()
gol.SetOption(gol.Llongfile | gol.Ldate | gol.Ltime | gol.Lmicroseconds)
gol.AddLogAdapter(a)
gol.Debug("Hello, gol!!!")
Expand Down

0 comments on commit b392019

Please sign in to comment.