Package lxml :: Module etree :: Class PyErrorLog
[show private | hide private]
[frames | no frames]

Type PyErrorLog

   object --+    
            |    
_BaseErrorLog --+
                |
               PyErrorLog


A global error log that connects to the Python stdlib logging package.

The constructor accepts an optional logger name.

If you want to change the mapping between libxml2's ErrorLevels and Python logging levels, you can modify the level_map dictionary from a subclass.

The default mapping is:
       ErrorLevels.WARNING = logging.WARNING
       ErrorLevels.ERROR   = logging.ERROR
       ErrorLevels.FATAL   = logging.CRITICAL
You can also override the method ``receive()`` that takes a LogEntry object and calls ``self.log(log_entry, format_string, arg1, arg2, ...)`` with appropriate data.
Method Summary
  __init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  copy(...)
Dummy method that returns an empty error log.
  log(...)
  receive(...)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Class Variable Summary
PyCObject __pyx_vtable__ = <PyCObject object at 0x401cb7d0>
member_descriptor level_map = <member 'level_map' of 'lxml.etree.PyErrorLo...

Method Details

__init__(...)
(Constructor)

x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides:
lxml.etree._BaseErrorLog.__init__

__new__(T, S, ...)

T.__new__(S, ...) -> a new object with type S, a subtype of T
Returns:
a new object with type S, a subtype of T
Overrides:
lxml.etree._BaseErrorLog.__new__

copy(...)

Dummy method that returns an empty error log.
Overrides:
lxml.etree._BaseErrorLog.copy

Class Variable Details

__pyx_vtable__

Type:
PyCObject
Value:
<PyCObject object at 0x401cb7d0>                                       

level_map

Type:
member_descriptor
Value:
<member 'level_map' of 'lxml.etree.PyErrorLog' objects>                

Generated by Epydoc 2.1 on Sat Aug 18 12:44:28 2007 http://epydoc.sf.net