Skip to content

Commit 9aadf45

Browse files
committed
polish comments
1 parent f69dde2 commit 9aadf45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

timberjack.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,15 +149,15 @@ func (l *Logger) Write(p []byte) (n int, err error) {
149149
l.lastRotationTime = currentTime()
150150
}
151151

152-
// 1. Time-based rotation
152+
// Time-based rotation
153153
if l.RotationInterval > 0 && currentTime().Sub(l.lastRotationTime) >= l.RotationInterval {
154154
if err := l.rotate(); err != nil {
155155
return 0, err
156156
}
157157
l.lastRotationTime = currentTime()
158158
}
159159

160-
// 2. Size-based rotation
160+
// Size-based rotation
161161
if l.size+writeLen > l.max() {
162162
if err := l.rotate(); err != nil {
163163
return 0, err

0 commit comments

Comments
 (0)