Package epydoc :: Module log
[hide private]
[frames] | no frames]

Module log

source code

Functions used to report messages and progress updates to the user. These functions are delegated to zero or more registered Logger objects, which are responsible for actually presenting the information to the user. Different interfaces are free to create and register their own Loggers, allowing them to present this information in the manner that is best suited to each interface.


Note: I considered using the standard logging package to provide this functionality. However, I found that it would be too difficult to get that package to provide the behavior I want (esp. with respect to progress displays; but also with respect to message blocks).

Classes [hide private]
  Logger
An abstract base class that defines the interface for loggers, which are used by epydoc to report information back to the user.
  SimpleLogger
Functions [hide private]
 
register_logger(logger)
Register a logger.
source code
 
remove_logger(logger) source code
 
fatal(*messages)
Display the given fatal message.
source code
 
error(*messages)
Display the given error message.
source code
 
warning(*messages)
Display the given warning message.
source code
call graph 
 
docstring_warning(*messages)
Display the given docstring warning message.
source code
call graph 
 
info(*messages)
Display the given informational message.
source code
call graph 
 
debug(*messages)
Display the given debugging message.
source code
 
start_block(header)
Start a new message block.
source code
 
end_block()
End a warning block.
source code
 
start_progress(header=None)
Begin displaying progress for a new task.
source code
call graph 
 
end_progress()
Finish off the display of progress for the current task.
source code
call graph 
 
progress(percent, message='')
Update the progress display.
source code
call graph 
 
close() source code
Variables [hide private]
  DOCSTRING_WARNING = 25
  _loggers = []
The list of registered logging functions.
    Message Severity Levels
  DEBUG = 10
  INFO = 20
  WARNING = 30
  ERROR = 40
  FATAL = 40
Function Details [hide private]

register_logger(logger)

source code 

Register a logger. Each call to one of the logging functions defined by this module will be delegated to each registered logger.

start_block(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.

end_block()

source code 

End a warning block. See start_block for details.

start_progress(header=None)

source code 
call graph 

Begin displaying progress for a new task. header is a description of the task for which progress is being reported. Each call to start_progress must be followed by a call to end_progress (with no intervening calls to start_progress).

end_progress()

source code 
call graph 

Finish off the display of progress for the current task. See start_progress for more information.

progress(percent, message='')

source code 
call graph 

Update the progress display.

Parameters:
  • percent - A float from 0.0 to 1.0, indicating how much progress has been made.
  • message - A message indicating the most recent action that contributed towards that progress.