Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
B
beego
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
beego
Commits
1fd7fa5d
Commit
1fd7fa5d
authored
May 03, 2018
by
Wang-Kai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make example runable
parent
0f730505
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
README.md
logs/README.md
+6
-6
No files found.
logs/README.md
View file @
1fd7fa5d
...
...
@@ -25,15 +25,15 @@ import (
Then init a Log (example with console adapter)
```
golang
log
:=
NewLogger
(
10000
)
log
.
SetLogger
(
"console"
,
""
)
log
:=
logs
.
NewLogger
(
10000
)
log
.
SetLogger
(
"console"
,
""
)
```
> the first params stand for how many channel
Use it like this:
```
golang
```
golang
log
.
Trace
(
"trace"
)
log
.
Info
(
"info"
)
log
.
Warn
(
"warning"
)
...
...
@@ -44,8 +44,8 @@ log.Critical("critical")
## File adapter
Configure file adapter like this:
```
golang
```
golang
log
:=
NewLogger
(
10000
)
log
.
SetLogger
(
"file"
,
`{"filename":"test.log"}`
)
```
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment