File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -180,22 +180,19 @@ def doRollover(self):
180
180
if not self .delay :
181
181
self .stream = self ._open ()
182
182
183
- def shouldRollover (self , record ):
183
+ def shouldRollover (self , _ ):
184
184
"""
185
- Determine if rollover should occur.
186
-
187
- Basically, see if the supplied record would cause the file to exceed
188
- the size limit we have.
185
+ Determine if the file has exceeded the size limit we have,
186
+ and therefore we should roll over.
189
187
"""
190
188
# See bpo-45401: Never rollover anything other than regular files
191
189
if os .path .exists (self .baseFilename ) and not os .path .isfile (self .baseFilename ):
192
190
return False
193
191
if self .stream is None : # delay was set...
194
192
self .stream = self ._open ()
195
193
if self .maxBytes > 0 : # are we rolling over?
196
- msg = "%s\n " % self .format (record )
197
194
self .stream .seek (0 , 2 ) #due to non-posix-compliant Windows feature
198
- if self .stream .tell () + len ( msg ) >= self .maxBytes :
195
+ if self .stream .tell () >= self .maxBytes :
199
196
return True
200
197
return False
201
198
You can’t perform that action at this time.
0 commit comments