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.
  remove_logger(logger)
  fatal(*messages)
Display the given fatal message.
  error(*messages)
Display the given error message.
  warning(*messages)
Display the given warning message.
  docstring_warning(*messages)
Display the given docstring warning message.
  info(*messages)
Display the given informational message.
  debug(*messages)
Display the given debugging message.
  start_block(header)
Start a new message block.
  end_block()
End a warning block.
  start_progress(header=None)
Begin displaying progress for a new task.
  end_progress()
Finish off the display of progress for the current task.
  progress(percent, message='')
Update the progress display.

Variables [hide private]
DOCSTRING_WARNING  
_loggers The list of registered logging functions.
    Message Severity Levels
DEBUG  
INFO  
WARNING  
ERROR  
FATAL  

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.

remove_logger(logger)

source code 

fatal(*messages)

source code 
Display the given fatal message.

error(*messages)

source code 
Display the given error message.

warning(*messages)

source code 
Display the given warning message.

docstring_warning(*messages)

source code 
call graph 
Display the given docstring warning message.

info(*messages)

source code 
call graph 
Display the given informational message.

debug(*messages)

source code 
call graph 
Display the given debugging message.

start_block(header)

source code 
call graph 
Start a new message block. Any calls to info, warn, 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 
call graph 
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:
  • progress - 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.

Variables Details [hide private]

DEBUG

Value:
10                                                                    
      

INFO

Value:
20                                                                    
      

DOCSTRING_WARNING

Value:
25                                                                    
      

WARNING

Value:
30                                                                    
      

ERROR

Value:
40                                                                    
      

FATAL

Value:
40                                                                    
      

_loggers

The list of registered logging functions.
Value:
[<__main__.UnifiedProgressConsoleLogger instance at 0x402352ac>]