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
f48ca96a
Commit
f48ca96a
authored
Apr 03, 2014
by
slene
Committed by
astaxie
Apr 04, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
beego: fix log output when SetLogger has error
parent
9421a210
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
0 deletions
+9
-0
conn.go
logs/conn.go
+3
-0
file.go
logs/file.go
+3
-0
smtp.go
logs/smtp.go
+3
-0
No files found.
logs/conn.go
View file @
f48ca96a
...
...
@@ -29,6 +29,9 @@ func NewConn() LoggerInterface {
// init connection writer with json config.
// json config only need key "level".
func
(
c
*
ConnWriter
)
Init
(
jsonconfig
string
)
error
{
if
len
(
jsonconfig
)
==
0
{
return
nil
}
err
:=
json
.
Unmarshal
([]
byte
(
jsonconfig
),
c
)
if
err
!=
nil
{
return
err
...
...
logs/file.go
View file @
f48ca96a
...
...
@@ -90,6 +90,9 @@ func NewFileWriter() LoggerInterface {
// "rotate":true
// }
func
(
w
*
FileLogWriter
)
Init
(
jsonconfig
string
)
error
{
if
len
(
jsonconfig
)
==
0
{
return
nil
}
err
:=
json
.
Unmarshal
([]
byte
(
jsonconfig
),
w
)
if
err
!=
nil
{
return
err
...
...
logs/smtp.go
View file @
f48ca96a
...
...
@@ -38,6 +38,9 @@ func NewSmtpWriter() LoggerInterface {
// "level":LevelError
// }
func
(
s
*
SmtpWriter
)
Init
(
jsonconfig
string
)
error
{
if
len
(
jsonconfig
)
==
0
{
return
nil
}
err
:=
json
.
Unmarshal
([]
byte
(
jsonconfig
),
s
)
if
err
!=
nil
{
return
err
...
...
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