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
338a23a1
Commit
338a23a1
authored
Jun 22, 2017
by
Jia Li Ong
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/jialijelly/beego
parents
16b5a114
547fbce8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
file_test.go
logs/file_test.go
+12
-10
No files found.
logs/file_test.go
View file @
338a23a1
...
...
@@ -185,11 +185,12 @@ func TestFileRotate_06(t *testing.T) { //test file mode
}
func
testFileRotate
(
t
*
testing
.
T
,
fn1
,
fn2
string
)
{
fw
:=
&
fileLogWriter
{
Daily
:
true
,
MaxDays
:
7
,
Rotate
:
true
,
Level
:
LevelTrace
,
Perm
:
"0660"
,
Daily
:
true
,
MaxDays
:
7
,
Rotate
:
true
,
Level
:
LevelTrace
,
Perm
:
"0660"
,
OtherPerm
:
"0440"
,
}
fw
.
Init
(
fmt
.
Sprintf
(
`{"filename":"%v","maxdays":1}`
,
fn1
))
fw
.
dailyOpenTime
=
time
.
Now
()
.
Add
(
-
24
*
time
.
Hour
)
...
...
@@ -208,11 +209,12 @@ func testFileRotate(t *testing.T, fn1, fn2 string) {
func
testFileDailyRotate
(
t
*
testing
.
T
,
fn1
,
fn2
string
)
{
fw
:=
&
fileLogWriter
{
Daily
:
true
,
MaxDays
:
7
,
Rotate
:
true
,
Level
:
LevelTrace
,
Perm
:
"0660"
,
Daily
:
true
,
MaxDays
:
7
,
Rotate
:
true
,
Level
:
LevelTrace
,
Perm
:
"0660"
,
OtherPerm
:
"0440"
,
}
fw
.
Init
(
fmt
.
Sprintf
(
`{"filename":"%v","maxdays":1}`
,
fn1
))
fw
.
dailyOpenTime
=
time
.
Now
()
.
Add
(
-
24
*
time
.
Hour
)
...
...
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