Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
张磊
/
FileStorageBeego
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
f48ca96a
authored
2014-04-04 07:33:13 +0800
by
slene
Committed by
astaxie
2014-04-04 09:57:45 +0800
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
beego: fix log output when SetLogger has error
1 parent
9421a210
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
0 deletions
logs/conn.go
logs/file.go
logs/smtp.go
logs/conn.go
View file @
f48ca96
...
...
@@ -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 @
f48ca96
...
...
@@ -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 @
f48ca96
...
...
@@ -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
Styling with
Markdown
is supported
Attach a file
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 post a comment