Package epydoc :: Module cli :: Class HTMLLogger |
[hide private]
[frames] | no frames]

# Class HTMLLogger

source code

A logger used to generate a log of all warnings and messages to an HTML file.

Instance Methods | [hide private]
__init__(self, directory, options) | source code
write_options(self, options) | source code
start_block(self, header) Start a new message block. | source code
end_block(self) End a warning block. | source code
log(self, level, message) Display a message. | source code
_message(self, level, message) | source code
close(self) Perform any tasks needed to close this logger. | source code
_elapsed_time(self) | source code
Inherited from `log.Logger`: `end_progress`, `progress`, `start_progress`

Class Variables | [hide private]
| FILENAME = ``'``epydoc-log.html``'``
| HEADER = ``'``<?xml version="1.0" encoding="ascii"?>\n<!DOCTYPE ht``...``
| START_BLOCK = ``'``<div class="log-block"><h2 class="log-hdr">%s</``...``
| MESSAGE = ``'``<div class="log-%s"><b>%s</b>: \n%s</div>\n``'``
| END_BLOCK = ``'``</div>``'``
| FOOTER = ``'``</body>\n</html>\n``'``

Method Details | [hide private]

### start_block(self, header) | source code
Start a new message block. Any calls to info(), warning(), or error() that occur between a call to `start_block` and a corresponding call to `end_block` will be grouped together, and displayed with a common header. `start_block` can be called multiple times (to form nested blocks), but every call to `start_block` must be balanced by a call to `end_block`. Overrides: log.Logger.start_block (inherited documentation)

### end_block(self) | source code
End a warning block. See start_block for details. Overrides: log.Logger.end_block (inherited documentation)

### log(self, level, message) | source code
Display a message. Parameters: `message` - The message string to display. `message` may contain newlines, but does not need to end in a newline. `level` - An integer value indicating the severity of the message. Overrides: log.Logger.log (inherited documentation)

### close(self) | source code
Perform any tasks needed to close this logger. Overrides: log.Logger.close (inherited documentation)

Class Variable Details | [hide private]

  ### HEADER Value:
      '''<?xml version="1.0" encoding="ascii"?>
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
                "DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
      <head>
        <title>Epydoc Log</title>
        <link rel="stylesheet" href="epydoc.css" type="text/css" />
      </head>
      ...

  ### START_BLOCK Value:
      '<div class="log-block"><h2 class="log-hdr">%s</h2>'