Lines Matching defs:log
60 """Writes python log message to our stream."""
63 #g_oReporter.log(0, 'python: %s' % (sText), utils.getCallerName(), utils.getTimePrefix());
109 def log(self, iLevel, sText, sCaller, sTsPrf):
111 Writes the specfied text to the log if iLevel is less or requal
153 return self.log(0, 'raw xml%s: %s' % (oFileWrapper.sPrefix, sRawXml), sCaller, utils.getTimePrefix());
205 return self.log(1, '%-50s: TESTING' % (self._testGetFullName()), sCaller, sTsPrf);
212 return self.log(0, ' %-48s: %12s %s' % (sName, sValue, sUnit), sCaller, sTsPrf);
219 return self.log(0, sDetails, sCaller, sTsPrf);
232 self.log(0, 'testDone on empty test stack!', sCaller, sTsPrf);
237 # log + xml.
242 self.log(1, '%-50s: PASSED' % (sFullName,), sCaller, sTsPrf);
245 self.log(1, '%-50s: SKIPPED' % (sFullName,), sCaller, sTsPrf);
248 self.log(0, '%-50s: TIMED-OUT - %d errors' % (sFullName, cErrors), sCaller, sTsPrf);
251 self.log(0, '%-50s: FAILED - %d errors' % (sFullName, cErrors), sCaller, sTsPrf);
298 # Figure the main log directory.
317 sTs = datetime.datetime.utcnow().strftime('%Y-%m-%dT%H-%M-%S.log');
326 # Open the log file and write a header.
328 sLogName = os.path.join(self.sLogDir, 'testsuite.log');
331 self.oLogFile.write(('Created log file at %s.\nRunning: %s' % (sTsIso, sys.argv)).encode('utf-8'));
334 # Open the xml log file and write the mandatory introduction.
347 """Ends and completes the log files."""
406 def log(self, iLevel, sText, sCaller, sTsPrf):
431 sDstFilename = os.path.join(self.sLogDir, 'other-%d-%s.log' \
433 self.log(0, 'Other log file: %s - %s (%s)' % (sDstFilename, sDescription, sSrcFilename), sCaller, sTsPrf);
440 self.log(0, 'error opening %s: %s' % (sDstFilename, oXcpt), sCaller, sTsPrf);
447 self.log(0, 'error reading %s: %s' % (sSrcFilename, oXcpt), sCaller, sTsPrf);
453 self.log(0, 'error writing %s: %s' % (sDstFilename, oXcpt), sCaller, sTsPrf);
460 # Leave a mark in the XML log.
580 """Flush pending log messages?"""
731 def log(self, iLevel, sText, sCaller, sTsPrf):
742 if sKind in [ 'text', 'log', ] or sKind.startswith('log/'):
743 self.log(0, '*** Uploading "%s" - KIND: "%s" - DESC: "%s" ***'
749 self.log(0, '*** Uploading "%s" - KIND: "%s" - DESC: "%s" ***'
755 self.log(0, '*** UNKNOWN FILE "%s" - KIND "%s" - DESC "%s" ***'
761 Flushes the XML back log. Called with the lock held, may leave it
788 """Flushes the XML back log if necessary."""
864 rc = g_oReporter.log(iLevel, "%s%s" % (sPrefix, sText), sCaller, sTsPrf);
876 g_oReporter.log(0, 'internal-error: Hit exception #2! %s' % (traceback.format_exc()), sCaller, sTsPrf);
883 rc = g_oReporter.log(iLevel, '%s%s' % (sPrefix, sLine), sCaller, sTsPrf);
886 g_oReporter.log(iLevel, 'No exception info...', sCaller, sTsPrf);
889 g_oReporter.log(0, 'internal-error: Hit exception! %s' % (traceback.format_exc()), None, sTsPrf);
892 g_oReporter.log(0, 'internal-error: No exception! %s'
925 g_oReporter.log(0, '%s: %s' % (self.sPrefix, sLine), sCaller, sTsPrf);
982 def log(sText):
983 """Writes the specfied text to the log."""
986 rc = g_oReporter.log(1, sText, utils.getCallerName(), utils.getTimePrefix());
1000 """Log level 2: Writes the specfied text to the log."""
1003 rc = g_oReporter.log(2, sText, utils.getCallerName(), utils.getTimePrefix());
1017 """ Maybe error or maybe normal log entry. """
1020 return log(sText);
1023 """ Maybe error or maybe normal log exception entry. """
1029 """ Maybe error or maybe normal log entry. """
1032 return log(sText);
1035 """ Maybe error or maybe normal log exception entry. """
1042 Writes the specfied error message to the log.
1052 g_oReporter.log(0, 'error: %s' % (sText), utils.getCallerName(), utils.getTimePrefix());
1073 Flags the current test as having timed out and writes the specified message to the log.
1083 g_oReporter.log(0, 'timeout-error: %s' % (sText), utils.getCallerName(), utils.getTimePrefix());
1091 Writes a fatal error to the log.
1101 g_oReporter.log(0, 'fatal error: %s' % (sText), utils.getCallerName(), utils.getTimePrefix());
1123 Adds the specified log file to the report if the file exists.
1125 The sDescription is a free form description of the log file.
1128 log file this really is.
1317 g_oReporter.log(1, '', sCaller, sTsPrf);
1318 g_oReporter.log(1, 'Thread %s (%#x)' % (idThread, idThread), sCaller, sTsPrf);
1322 g_oReporter.log(1, ' Stack formatting failed w/ exception', sCaller, sTsPrf);
1327 g_oReporter.log(1, sLine, sCaller, sTsPrf);