Log an arbitrary message. This is used by all other logging functions. Override it if you have specific logging wishes. The first argument, FORMAT, is a format string for the message to be logged. If the format string contains any % escapes requiring param
(self, format, *args)
| 633 | _control_char_table[ord('\\')] = r'\\' |
| 634 | |
| 635 | def log_message(self, format, *args): |
| 636 | """Log an arbitrary message. |
| 637 | |
| 638 | This is used by all other logging functions. Override |
| 639 | it if you have specific logging wishes. |
| 640 | |
| 641 | The first argument, FORMAT, is a format string for the |
| 642 | message to be logged. If the format string contains |
| 643 | any % escapes requiring parameters, they should be |
| 644 | specified as subsequent arguments (it's just like |
| 645 | printf!). |
| 646 | |
| 647 | The client ip and current date/time are prefixed to |
| 648 | every message. |
| 649 | |
| 650 | Unicode control characters are replaced with escaped hex |
| 651 | before writing the output to stderr. |
| 652 | |
| 653 | """ |
| 654 | |
| 655 | message = format % args |
| 656 | sys.stderr.write("%s - - [%s] %s\n" % |
| 657 | (self.address_string(), |
| 658 | self.log_date_time_string(), |
| 659 | message.translate(self._control_char_table))) |
| 660 | |
| 661 | def version_string(self): |
| 662 | """Return the server software version string.""" |
no test coverage detected