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
89298141
Commit
89298141
authored
Jan 06, 2016
by
astaxie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix the log carsh before init
parent
f7ef4aa7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
10 deletions
+8
-10
beego.go
beego.go
+5
-7
log.go
log.go
+3
-3
No files found.
beego.go
View file @
89298141
...
...
@@ -20,16 +20,15 @@ import (
"path/filepath"
"strconv"
"strings"
"github.com/astaxie/beego/logs"
)
const
(
// beego web framework version.
VERSION
=
"1.
5
.0"
//
VERSION represent
beego web framework version.
VERSION
=
"1.
6
.0"
// beego run modes
DEV
=
"dev"
// DEV is for develop
DEV
=
"dev"
// PROD is for production
PROD
=
"prod"
)
...
...
@@ -75,7 +74,6 @@ func initBeforeHTTPRun() {
panic
(
err
)
}
//init log
BeeLogger
=
logs
.
NewLogger
(
10000
)
for
adaptor
,
config
:=
range
BConfig
.
Log
.
Output
{
err
=
BeeLogger
.
SetLogger
(
adaptor
,
config
)
if
err
!=
nil
{
...
...
log.go
View file @
89298141
...
...
@@ -32,6 +32,9 @@ const (
LevelDebug
)
// BeeLogger references the used application logger.
var
BeeLogger
=
logs
.
NewLogger
(
100
)
// SetLevel sets the global log level used by the simple logger.
func
SetLevel
(
l
int
)
{
BeeLogger
.
SetLevel
(
l
)
...
...
@@ -43,9 +46,6 @@ func SetLogFuncCall(b bool) {
BeeLogger
.
SetLogFuncCallDepth
(
3
)
}
// BeeLogger references the used application logger.
var
BeeLogger
*
logs
.
BeeLogger
// SetLogger sets a new logger.
func
SetLogger
(
adaptername
string
,
config
string
)
error
{
err
:=
BeeLogger
.
SetLogger
(
adaptername
,
config
)
...
...
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