OpenGL.logs
index
/home/mcfletch/pylive/OpenGL/logs.py

Fix missing-API problems in logging module (circa Python 2.3)
 
Adds constants to the log objects.
Adds getException(err) to log objects to retrieve 
formatted exception or err if traceback not available.

 
Modules
       
logging
traceback

 
Classes
       
object
_LoggedFunction
_ErrorLoggedFunction
_FullLoggedFunction

 
class _ErrorLoggedFunction(_LoggedFunction)
    On-error-logged function wrapper
 
 
Method resolution order:
_ErrorLoggedFunction
_LoggedFunction
object

Methods defined here:
__call__(self, *args, **named)

Methods inherited from _LoggedFunction:
__getattr__(self, key)
__init__(self, base, log)
__setattr__(self, key, value)

Data descriptors inherited from _LoggedFunction:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class _FullLoggedFunction(_LoggedFunction)
    Fully-logged function wrapper (logs all call params to OpenGL.calltrace)
 
 
Method resolution order:
_FullLoggedFunction
_LoggedFunction
object

Methods defined here:
__call__(self, *args, **named)

Methods inherited from _LoggedFunction:
__getattr__(self, key)
__init__(self, base, log)
__setattr__(self, key, value)

Data descriptors inherited from _LoggedFunction:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class _LoggedFunction(object)
    Proxy that overrides __call__ to log arguments
 
  Methods defined here:
__getattr__(self, key)
__init__(self, base, log)
__setattr__(self, key, value)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Functions
       
StringIO(...)
StringIO([s]) -- Return a StringIO-like stream for reading or writing
getException(error)
Get formatted traceback from exception
logOnFail(function, log)
Produce possible log-wrapped version of function
 
function -- callable object to be wrapped
log -- the log to which to log information
 
Uses ERROR_LOGGING and FULL_LOGGING
to determine whether/how to wrap the function.

 
Data
        ERROR_LOGGING = False
FULL_LOGGING = False
__file__ = '/home/mcfletch/pylive/OpenGL/logs.pyc'
__name__ = 'OpenGL.logs'
__package__ = 'OpenGL'