Package xmpp :: Module debug :: Class Debug
[show private | hide private]
[frames | no frames]

Class Debug


Method Summary
  __init__(self, active_flags, log_file, prefix, sufix, time_stamp, flag_show, validate_flags, welcome)
  active_get(self)
returns currently active flags.
  active_set(self, active_flags)
returns 1 if any flags where actually set, otherwise 0.
  is_active(self, flag)
  Show(self, flag, msg, prefix)
  show(self, msg, flag, prefix, sufix, lf)
flag can be of folowing types:...

Class Variable Summary
dict colors = {'warn': '\x1b[33;1m', 'stop': '\x1b[30;1m', 'o...

Method Details

active_get(self)

returns currently active flags.

active_set(self, active_flags=None)

returns 1 if any flags where actually set, otherwise 0.

show(self, msg, flag=None, prefix=None, sufix=None, lf=0)

flag can be of folowing types:
    None - this msg will always be shown if any debugging is on
    flag - will be shown if flag is active
    (flag1,flag2,,,) - will be shown if any of the given flags 
                       are active

if prefix / sufix are not given, default ones from init will be used

lf = -1 means strip linefeed if pressent
lf = 1 means add linefeed if not pressent

Class Variable Details

colors

Type:
dict
Value:
{'CONNECTproxy': '\x1b[30;1m',
 'auth': '\x1b[33;1m',
 'client': '\x1b[36m',
 'component': '\x1b[36m',
 'data': '\x1b[33m',
 'dispatcher': '\x1b[32m',
 'down': '\x1b[33m',
 'error': '\x1b[31m',
...                                                                    

Generated by Epydoc 2.1 on Sun Dec 26 09:52:57 2004 http://epydoc.sf.net