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
589f9713
authored
2014-03-21 14:07:03 +0800
by
asta.xie
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
add w.Rotate
1 parent
65631e05
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
logs/file.go
logs/file.go
View file @
589f971
...
...
@@ -118,9 +118,9 @@ func (w *FileLogWriter) StartLogger() error {
func
(
w
*
FileLogWriter
)
docheck
(
size
int
)
{
w
.
startLock
.
Lock
()
defer
w
.
startLock
.
Unlock
()
if
(
w
.
Maxlines
>
0
&&
w
.
maxlines_curlines
>=
w
.
Maxlines
)
||
if
w
.
Rotate
&&
(
(
w
.
Maxlines
>
0
&&
w
.
maxlines_curlines
>=
w
.
Maxlines
)
||
(
w
.
Maxsize
>
0
&&
w
.
maxsize_cursize
>=
w
.
Maxsize
)
||
(
w
.
Daily
&&
time
.
Now
()
.
Day
()
!=
w
.
daily_opendate
)
{
(
w
.
Daily
&&
time
.
Now
()
.
Day
()
!=
w
.
daily_opendate
)
)
{
if
err
:=
w
.
DoRotate
();
err
!=
nil
{
fmt
.
Fprintf
(
os
.
Stderr
,
"FileLogWriter(%q): %s
\n
"
,
w
.
Filename
,
err
)
return
...
...
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