Lines Matching refs:when
81 Modify the filename of a log file when rotating.
122 to the next when the current file reaches a certain size.
139 written to is always "app.log" - when it gets filled up, it is closed
207 If backupCount is > 0, when rollover is done, no more than backupCount
210 def __init__(self, filename, when='h', interval=1, backupCount=0,
216 self.when = when.upper()
221 # seconds between rollovers. Also set the filename suffix used when
222 # a rollover occurs. Current 'when' events supported:
230 # Case of the 'when' specifier is not important; lower or upper case
232 if self.when == 'S':
236 elif self.when == 'M':
240 elif self.when == 'H':
244 elif self.when == 'D' or self.when == 'MIDNIGHT':
248 elif self.when.startswith('W'):
250 if len(self.when) != 2:
251 raise ValueError("You must specify a day for weekly rollover from 0 to 6 (0 is Monday): %s" % self.when)
252 if self.when[1] < '0' or self.when[1] > '6':
253 raise ValueError("Invalid day specified for weekly rollover: %s" % self.when)
254 self.dayOfWeek = int(self.when[1])
258 raise ValueError("Invalid rollover interval specified: %s" % self.when)
283 if self.when == 'MIDNIGHT' or self.when.startswith('W'):
303 # Rotate time is before the current time (for example when
324 if self.when.startswith('W'):
365 Determine the files to delete when rolling over.
372 # See bpo-44753: Don't use the extension when computing the prefix.
408 when the rollover happens. However, you want the file to be named for the
445 if (self.when == 'MIDNIGHT' or self.when.startswith('W')) and not self.utc:
616 This function allows for partial sends which can happen when the
731 when the network is busy - UDP does not guarantee delivery and
898 --- the method will be called again when emitting an event,
969 This is useful in two scenarios: when custom levels are being
1034 only be used when authentication credentials are supplied. The tuple
1243 Override when a custom connection is required, for example if
1357 is full, or when an event of a certain severity or greater is seen.
1369 reasons - the old behaviour is that when the handler is closed, the