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
4a329db7
Commit
4a329db7
authored
Sep 09, 2013
by
astaxie
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #187 from Unknwon/master
compatiable for old version
parents
63da3294
1f8022d4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
log.go
log.go
+12
-6
No files found.
log.go
View file @
4a329db7
package
beego
import
(
"strings"
"github.com/astaxie/beego/logs"
)
...
...
@@ -35,30 +37,34 @@ func SetLogger(adaptername string, config string) {
// Trace logs a message at trace level.
func
Trace
(
v
...
interface
{})
{
BeeLogger
.
Trace
(
"%v"
,
v
...
)
BeeLogger
.
Trace
(
generateFmtStr
(
len
(
v
))
,
v
...
)
}
// Debug logs a message at debug level.
func
Debug
(
v
...
interface
{})
{
BeeLogger
.
Debug
(
"%v"
,
v
...
)
BeeLogger
.
Debug
(
generateFmtStr
(
len
(
v
))
,
v
...
)
}
// Info logs a message at info level.
func
Info
(
v
...
interface
{})
{
BeeLogger
.
Info
(
"%v"
,
v
...
)
BeeLogger
.
Info
(
generateFmtStr
(
len
(
v
))
,
v
...
)
}
// Warning logs a message at warning level.
func
Warn
(
v
...
interface
{})
{
BeeLogger
.
Warn
(
"%v"
,
v
...
)
BeeLogger
.
Warn
(
generateFmtStr
(
len
(
v
))
,
v
...
)
}
// Error logs a message at error level.
func
Error
(
v
...
interface
{})
{
BeeLogger
.
Error
(
"%v"
,
v
...
)
BeeLogger
.
Error
(
generateFmtStr
(
len
(
v
))
,
v
...
)
}
// Critical logs a message at critical level.
func
Critical
(
v
...
interface
{})
{
BeeLogger
.
Critical
(
"%v"
,
v
...
)
BeeLogger
.
Critical
(
generateFmtStr
(
len
(
v
)),
v
...
)
}
func
generateFmtStr
(
n
int
)
string
{
return
strings
.
Repeat
(
"%v "
,
n
)
}
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