def 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
        """
        
        if self.validate_flags:
            self._validate_flag( flag )
            
        if not self.is_active(flag):
            return
        if prefix:
            pre = prefix
        else:
            pre = self.prefix
        if sufix:
            suf = sufix
        else:
            suf = self.sufix

        if self.time_stamp == 2:
            output = '%s%s ' % ( pre,
                                 time.strftime('%b %d %H:%M:%S',
                                 time.localtime(time.time() )),
                                 )
        elif self.time_stamp == 1:
            output = '%s %s' % ( time.strftime('%b %d %H:%M:%S',
                                 time.localtime(time.time() )),
                                 pre,
                                 )
        else:
            output = pre
            
        if self.flag_show:
            if flag:
                output = '%s%s%s' % ( output, flag, self.flag_show )
            else:
                # this call uses the global default,
                # dont print "None", just show the separator
                output = '%s %s' % ( output, self.flag_show )

        output = '%s%s%s' % ( output, msg, suf )
        if lf:
            # strip/add lf if needed
            last_char = output[-1]
            if lf == 1 and last_char != LINE_FEED:
                output = output + LINE_FEED
            elif lf == -1 and last_char == LINE_FEED:
                output = output[:-1]
        try:
            self._fh.write( output )
        except:
            # unicode strikes again ;)
            s=u''
            for i in range(len(output)):
                if ord(output[i]) < 128:
                    c = output[i]
                else:
                    c = '?'
                s=s+c
            self._fh.write( '%s%s%s' % ( pre, s, suf ))
        self._fh.flush()

        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
        
chrome-cordova/gcmServer/xmpp/debug.py