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
1d1ad699
authored
2014-08-26 06:37:35 +0200
by
Francois
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Print error if occurred in WriteMsg
1 parent
a3888cef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
logs/log.go
logs/log.go
View file @
1d1ad69
...
...
@@ -193,7 +193,10 @@ func (bl *BeeLogger) startLogger() {
select
{
case
bm
:=
<-
bl
.
msg
:
for
_
,
l
:=
range
bl
.
outputs
{
l
.
WriteMsg
(
bm
.
msg
,
bm
.
level
)
err
:=
l
.
WriteMsg
(
bm
.
msg
,
bm
.
level
)
if
err
!=
nil
{
fmt
.
Println
(
"ERROR, unable to WriteMsg:"
,
err
)
}
}
}
}
...
...
@@ -281,7 +284,10 @@ func (bl *BeeLogger) Close() {
if
len
(
bl
.
msg
)
>
0
{
bm
:=
<-
bl
.
msg
for
_
,
l
:=
range
bl
.
outputs
{
l
.
WriteMsg
(
bm
.
msg
,
bm
.
level
)
err
:=
l
.
WriteMsg
(
bm
.
msg
,
bm
.
level
)
if
err
!=
nil
{
fmt
.
Println
(
"ERROR, unable to WriteMsg (while closing logger):"
,
err
)
}
}
}
else
{
break
...
...
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