Logo Search packages:      
Sourcecode: scanerrlog version File versions  Download package

def scanerrlog::ApacheErrorLog::cgireport (   self,
  title = SEL_DEFAULTTITLE,
  format = SEL_DEFAULTFORMAT,
  withheader = SEL_DEFAULTWITHHEADER 
)

Outputs the report as a CGI output

Definition at line 898 of file scanerrlog.py.

00898                                                                                                                       :
                """Outputs the report as a CGI output"""
                #
                # we do this test here too, to be able to catch
                # the problem and show it into the user's browser
                # before the underlying function do it to stderr only.
                if not self.__read :
                        _cgi_error("Error logfile [%s] not read" % repr(self.__infile))
                else :
                        format = string.lower(format)
                        if format not in SEL_MIMETYPES.keys() :
                                _cgi_error("Incorrect [%s] format value. This variable should be one of %s" % (format, repr(SEL_MIMETYPES.keys())))
                        else :
                                (ctype, cdisp) = SEL_MIMETYPES[format]
                                doc = jaxml.CGI_document(content_type = ctype)
                                if cdisp :
                                        doc._set_content_disposition(cdisp)
                                doc._output(SEL_DEFAULTFILENAME)
                                getattr(self, format + "report")(title, SEL_DEFAULTFILENAME, withheader)

        def open(self, file) :


Generated by  Doxygen 1.6.0   Back to index