Modify the filename of a log file when rotating. This is provided so that a custom filename can be provided. The default implementation calls the 'namer' attribute of the handler, if it's callable, passing the default name to it. If the attribute isn't call
(self, default_name)
| 83 | self.handleError(record) |
| 84 | |
| 85 | def rotation_filename(self, default_name): |
| 86 | """ |
| 87 | Modify the filename of a log file when rotating. |
| 88 | |
| 89 | This is provided so that a custom filename can be provided. |
| 90 | |
| 91 | The default implementation calls the 'namer' attribute of the |
| 92 | handler, if it's callable, passing the default name to |
| 93 | it. If the attribute isn't callable (the default is None), the name |
| 94 | is returned unchanged. |
| 95 | |
| 96 | :param default_name: The default name for the log file. |
| 97 | """ |
| 98 | if not callable(self.namer): |
| 99 | result = default_name |
| 100 | else: |
| 101 | result = self.namer(default_name) |
| 102 | return result |
| 103 | |
| 104 | def rotate(self, source, dest): |
| 105 | """ |
no test coverage detected