Lines Matching +full:close +full:- +full:issue +full:- +full:message
1 # Copyright 2001-2021 by Vinay Sajip. All Rights Reserved.
21 Copyright (C) 2001-2021 Vinay Sajip. All Rights Reserved.
113 # Issue 18940: A file may not have been created if delay is True.
139 written to is always "app.log" - when it gets filled up, it is closed
165 self.stream.close()
168 for i in range(self.backupCount - 1, 0, -1):
190 # See bpo-45401: Never rollover anything other than regular files
197 self.stream.seek(0, 2) #due to non-posix-compliant Windows feature
208 files are kept - the oldest ones are deleted.
223 # S - Seconds
224 # M - Minutes
225 # H - Hours
226 # D - Days
227 # midnight - roll over at midnight
228 # W{0-6} - roll over on a certain day; 0 - Monday
234 self.suffix = "%Y-%m-%d_%H-%M-%S"
235 self.extMatch = r"^\d{4}-\d{2}-\d{2}_\d{2}-\d{2}-\d{2}(\.\w+)?$"
238 self.suffix = "%Y-%m-%d_%H-%M"
239 self.extMatch = r"^\d{4}-\d{2}-\d{2}_\d{2}-\d{2}(\.\w+)?$"
242 self.suffix = "%Y-%m-%d_%H"
243 self.extMatch = r"^\d{4}-\d{2}-\d{2}_\d{2}(\.\w+)?$"
246 self.suffix = "%Y-%m-%d"
247 self.extMatch = r"^\d{4}-\d{2}-\d{2}(\.\w+)?$"
255 self.suffix = "%Y-%m-%d"
256 self.extMatch = r"^\d{4}-\d{2}-\d{2}(\.\w+)?$"
263 # path object (see Issue #27493), but self.baseFilename will be a string
300 r = rotate_ts - ((currentHour * 60 + currentMinute) * 60 +
315 # next rollover is simply 6 - 2 - 1, or 3.
318 # Days to rollover is 6 - 5 + 3, or 4. In this case, it's the
328 daysToWait = self.dayOfWeek - day
330 daysToWait = 6 - day + self.dayOfWeek + 1
333 dstNow = t[-1]
334 dstAtRollover = time.localtime(newRolloverAt)[-1]
337 addend = -3600
372 # See bpo-44753: Don't use the extension when computing the prefix.
391 # See bpo-45628: The date/time suffix could be anywhere in the
402 result = result[:len(result) - self.backupCount]
414 self.stream.close()
418 dstNow = time.localtime(currentTime)[-1]
419 t = self.rolloverAt - self.interval
424 dstThen = timeTuple[-1]
429 addend = -3600
446 dstAtRollover = time.localtime(newRolloverAt)[-1]
449 addend = -3600
467 under Windows open files cannot be moved or renamed - logging
468 opens the files with exclusive locks - and so there is no need
482 self.dev, self.ino = -1, -1
495 has, close the old stream and reopen the file to get the
500 # See issue #14632: Thanks to John Mulligan for the problem report
512 self.stream.close()
513 self.stream = None # See Issue #21742: _open () might fail.
546 When the attribute *closeOnError* is set to True - if a socket error
580 result.close() # Issue 19182
628 self.sock.close()
640 # See issue #14436: If msg or args are objects, they may not be
647 # Issue #25685: delete 'message' if present: redundant with 'msg'
648 d.pop('message', None)
657 An error has occurred during logging. Most likely cause -
658 connection lost. Close the socket so that we can retry on the
662 self.sock.close()
673 If there was a problem with the socket, re-establishes the
682 def close(self): member in SocketHandler
691 sock.close()
692 logging.Handler.close(self)
731 when the network is busy - UDP does not guarantee delivery and
742 http://www.nightmare.com/squirl/python-ext/misc/syslog.py
749 # priorities/facilities are encoded into a single 32-bit quantity, where
750 # the bottom 3 bits are the priority (0-7) and the top 28 bits are the
751 # facility (0-big number). Both the priorities and the facilities map
752 # roughly one-to-one to strings in the syslogd(8) source code. This
764 LOG_DEBUG = 7 # debug-level messages
768 LOG_USER = 1 # random user-level messages
822 "solaris-cron": LOG_SOLCRON,
837 #there's more to it than meets the eye - in some locales, lowercasing
879 self.socket.close()
890 self.socket.close()
898 --- the method will be called again when emitting an event,
933 sock.close()
942 integers - if strings are passed, the facility_names and
952 def close(self): member in SysLogHandler
961 sock.close()
962 logging.Handler.close(self)
971 mapping by lowercasing the logging level name because of locale-
997 prio = prio.encode('utf-8')
998 # Message is a string. Convert to bytes as required by RFC 5424
999 msg = msg.encode('utf-8')
1009 self.socket.close()
1029 line of the email. To specify a non-standard SMTP port, use the
1035 will be either an empty tuple, or a single-value tuple with the name
1036 of a keyfile, or a 2-value tuple with the names of the keyfile and
1062 If you want to specify a subject line which is record-dependent,
1075 from email.message import EmailMessage
1103 provided, win32service.pyd (which contains some basic message
1105 your event logs big, as the entire message source is held in the log.
1107 which contains the message definitions you want to use in the event log.
1123 # existing source - handle this specific case.
1146 Return the message ID for the event record. If you are using your
1149 you could use a dictionary lookup to get the message ID. This
1150 version returns 1, which is the base message ID in win32service.pyd.
1180 Determine the message ID, event category and event type. Then
1181 log the message in the NT event log.
1193 def close(self): member in NTEventLogHandler
1200 Viewer - it needs to be able to access the registry to get the
1204 logging.Handler.close(self)
1257 Send the record to the web server as a percent-encoded dictionary
1277 # See issue #30904: putrequest call above already adds this header
1281 h.putheader("Content-type",
1282 "application/x-www-form-urlencoded")
1283 h.putheader("Content-length", str(len(data)))
1286 s = ('%s:%s' % self.credentials).encode('utf-8')
1291 h.send(data.encode('utf-8'))
1342 def close(self): member in BufferingHandler
1344 Close the handler.
1346 This version just flushes and chains to the parent class' close().
1351 logging.Handler.close(self)
1369 reasons - the old behaviour is that when the handler is closed, the
1376 # See Issue #26559 for why this has been added
1413 def close(self): member in MemoryHandler
1425 BufferingHandler.close(self)
1434 (in a multi-process application), so as to avoid file write contention
1463 The base implementation formats the record to merge the message and
1464 arguments, and removes unpickleable items from the record in-place.
1466 `message` attributes with the merged message (obtained by
1476 # message. We can then use this to replace the original
1481 # bpo-35726: make copy of record to avoid affecting other handlers in the chain.
1483 record.message = msg
1545 This method just returns the passed-in record. You may want to