Creating the logfile after the analysis.
439988
public function finalize()
    {
        // Output our chunks.
        // Every output is split into 4 chunk strings (header, messages,
        // data, footer).
        foreach ($this->chunkStrings as $chunkString) {
            // Save everything to the file after we are done.
            $this->pool->chunks->saveDechunkedToFile($chunkString);
        }
    }
433528
def createSummary(self, log):
        
        warnings = self.obs.warnings
        errors = []
        if warnings:
            self.addCompleteLog('%d Warnings' % len(warnings), "\n".join(warnings))
        if errors:
            self.addCompleteLog('%d Errors' % len(errors), "\n".join(errors))
575263
def write_logfile():
    # type: () -> None
    """"""
    command = os.path.basename(os.path.realpath(os.path.abspath(sys.argv[0])))
    now = datetime.datetime.now().strftime('%Y%m%d-%H%M%S.%f')
    filename = '{}-{}.log'.format(command, now)
    with open(filename, 'w') as logfile:
        if six.PY3:
            logfile.write(_LOGFILE_STREAM.getvalue())
        else:
            logfile.write(_LOGFILE_STREAM.getvalue().decode(  # type: ignore
                errors='replace'))
1194114
private void openLog()
  {
    closeLogStream();

    WriteStream os = _os;
    _os = null;

    IoUtil.close(os);

    Path path = getPath();

    if (path == null) {
      path = getPath(CurrentTime.currentTime());
    }

    Path parent = path.getParent();

    try {
      if (! Files.isDirectory(parent)) {
        Files.createDirectory(parent);
      }
    } catch (Exception e) {
      logWarning(L.l("Can't create log directory {0}.\n  Exception={1}",
                     parent, e), e);
    }

    Exception exn = null;

    for (int i = 0; i < 3 && _os == null; i++) {
      try {
        OutputStream out = Files.newOutputStream(path, StandardOpenOption.APPEND);
        _os = new WriteStream(out);
      } catch (IOException e) {
        exn = e;
      }
    }

    String pathName = path.toString();

    try {
      if (pathName.endsWith(".gz")) {
        _zipOut = _os;
        _os = new WriteStream(new GZIPOutputStream(_zipOut));
      }
      else if (pathName.endsWith(".zip")) {
        throw new ConfigException("Can't support .zip in path-format");
      }
    } catch (Exception e) {
      if (exn == null)
        exn = e;
    }

    if (exn != null)
      logWarning(L.l("Can't create log for {0}.\n  User={1} Exception={2}",
                     path, System.getProperty("user.name"), exn), exn);
  }
448125
def saveLogs(self, filename) :
		""""""
		f = open(filename, 'wb')
		cPickle.dump(self.logs, f)
		f.close()
930241
def create(self):
        
        logger.info("Generating the report from %s to %s", self.start_date, self.end_date)

        self.create_data_figs()
        self.create_pdf()

        logger.info("Report completed")
606472
def create(self):
        
        logger.info("Generating the report from %s to %s", self.start, self.end)

        self.create_data_figs()
        self.create_pdf()

        logger.info("Report completed")
870464
def log(self) :
		""""""
		
		self.logs['epochDuration'].append(self.lastEpochDuration)
		self.logs['avg'].append(self.avg)
		self.logs['runtime'].append(self.runtime)
		self.logs['remtime'].append(self.remtime)
1357287
private void createMonitoringFile() {
        String monitoringDirName = getMonitoringDirName();
        monitoringDir = new File(monitoringDirName);

        File monitoringFile = new File(monitoringDir, gatewayId);
        IoUtil.deleteIfExists(monitoringFile);
        monitorFileWriter.initialize(monitoringFile);
    }
563112
private void processLog() {

        if (!database.isFilesInJar() && fa.isStreamElement(logFileName)) {
            ScriptRunner.runScript(database, logFileName,
                                   ScriptWriterBase.SCRIPT_TEXT_170);
        }
    }
558665
def create_report(self):
        """"""
        data = self.create_data()
        try:
            json_string = json.dumps(data)
        except UnicodeDecodeError as e:
            log.error('ERROR: While preparing JSON:', exc_info=e)
            self.debug_bad_encoding(data)
            raise

        log_string = re.sub(r'"repo_token": "(.+?)"',
                            '"repo_token": "[secure]"', json_string)
        log.debug(log_string)
        log.debug('==\nReporting %s files\n==\n', len(data['source_files']))
        for source_file in data['source_files']:
            log.debug('%s - %s/%s', source_file['name'],
                      sum(filter(None, source_file['coverage'])),
                      len(source_file['coverage']))
        return json_string
516176
def log(self, logfile=None):
        """"""
        if logfile is None:
            logfile = sys.stderr
        tb = self.plaintext.rstrip() + '\n'

        file_mode = getattr(logfile, 'mode', None)
        if file_mode is not None:
            if 'b' in file_mode:
                tb = tb.encode('utf-8')
            logfile.write(tb)
929592
def dump_to_log(self, logger):
        """"""
        logger.error("Execution ended in %s for cmd %s", self._retcode, self._cmd)
        for line in self._collected_stdout:
            logger.error(STDOUT_LOG_PREFIX + line)
793418
private static void initLogFile() {
    try (BufferedWriter bw = new BufferedWriter(new FileWriter(getLogPath()))) {
      Date date = new Date();
      bw.write("LT office integration log from " + date.toString() + logLineBreak);
    } catch (Throwable t) {
      showError(t);
    }
  }
698798
def createSummary(self, log):
        

        # If there were any warnings, make the log if lines with warnings
        # available
        if self.warnCount:
            self.addCompleteLog("warnings (%d)" % self.warnCount,
                                "\n".join(self.loggedWarnings) + "\n")

        warnings_stat = self.getStatistic('warnings', 0)
        self.setStatistic('warnings', warnings_stat + self.warnCount)

        old_count = self.getProperty("warnings-count", 0)
        self.setProperty(
            "warnings-count", old_count + self.warnCount, "WarningCountingShellCommand")
1292460
def init_fileoutput (self, args):
        """"""
        super(TextLogger, self).init_fileoutput(args)
        if self.fd is not None:
            self.fd = ansicolor.Colorizer(self.fd)
12103
private void logSummary(final List<IncidentImpl> incidents) {
        if (incidents.isEmpty())
            return;

        // summaryFile can be replaced so hold on to a local copy
        File outFile = summaryFile;

        if (outFile == null) {
            outFile = summaryFile = createNewSummaryFile();
        }

        // outFile can still be null, the create above can still fail
        if (outFile != null) {
            synchronized (outFile) {
                OutputStream os = null;
                try {
                    os = createSummaryStream(outFile);
                    new IncidentSummaryLogger().logIncidentSummary(os, incidents);
                } catch (FileNotFoundException e) {
                    // This is FFDC not being able to find itself... we're in bad
                    // shape if this doesn't work.. 
                    e.printStackTrace();
                } catch (IOException e) {
                } finally {
                    LoggingFileUtils.tryToClose(os);
                }
            }
        }
    }