Logs the source files that were not successfully loaded into MySQL.
960423
private function logOverviewErrors(): void
  {
    if (!empty($this->errorFilenames))
    {
      $this->io->warning('Routines in the files below are not loaded:');
      $this->io->listing($this->errorFilenames);
    }
  }
1174553
function ( callback ) {
		console.error( 'Getting %s logs since %s...', logType, start );

		client.getLog( logType, start, function ( err, data, next ) {
			const len = data && data.length;

			client.log( 'Got %s log entries', len );

			if ( len > 0 ) {
				// it's our first batch of data - format CSV header
				if ( start === '' ) {
					writeCsvLine( Object.keys( data[ 0 ] ) );
				}

				// print rows
				data.forEach( writeCsvLine );
			}

			// next time get next batch
			start = next;
			callback( next ? null : 'no more data' );
		} );
	}
1164751
public function handleClearLogs(): void
	{
		if ($this->isAjax()) {
			$this->app->logs->delete();
			$grid = $this['logsList'];
			$grid->setDataSource($this->app->logs->logs);
			$grid->reload();
		} else {
			$this->terminate();
		}
	}
66760
public function load()
	{
		if (!$infile = $this->arguments->getOpt(3))
		{
			$this->output->error('Please provide an input file');
		}
		else
		{
			if (!is_file($infile))
			{
				$this->output->error("'{$infile}' does not appear to be a valid file");
			}
		}

		// First, set some things aside that we need to reapply after the update
		$params                           = [];
		$params['com_system']             = \Component::params('com_system');
		$params['com_tools']              = \Component::params('com_tools');
		$params['com_usage']              = \Component::params('com_usage');
		$params['com_users']              = \Component::params('com_users');
		$params['plg_projects_databases'] = \Plugin::params('projects', 'databases');

		$tables = App::get('db')->getTableList();

		// See if we should drop all tables first
		if ($this->arguments->getOpt('drop-all-tables'))
		{
			$this->output->addLine('Dropping all tables...');
			foreach ($tables as $table)
			{
				App::get('db')->dropTable($table);
			}
		}

		// Craft the command to be executed
		$infile = escapeshellarg($infile);
		$cmd    = "mysql -u " . Config::get('user') . " -p'" . Config::get('password') . "' -D " . Config::get('db') . " < {$infile}";

		$this->output->addLine('Loading data from ' . $infile . '...');

		// Now push the big red button
		exec($cmd);

		$migration = new Migration(App::get('db'));

		// Now load some things back up
		foreach ($params as $k => $v)
		{
			if (!empty($v))
			{
				$migration->saveParams($k, $v);
			}
		}

		$this->output->addLine('Load complete!', 'success');
	}
121930
private function dumpSql()
    {
        $this->app['schema']->check();

        $context = [
            'alters'  => $this->app['schema.comparator']->getAlters(),
            'creates' => $this->app['schema.comparator']->getCreates(),
        ];

        foreach ($context as $section) {
            foreach ($section as $sql) {
                $this->io->writeln($sql);
            }
        }
    }
1311781
def log(self, logfile=None):
        """"""
        if logfile is None:
            logfile = sys.stderr
        tb = self.plaintext.rstrip() + u"\n"
        logfile.write(to_native(tb, "utf-8", "replace"))
671973
protected void loadWaterMarks() throws IOException {
        // Load source water marks from file
        if (file != null && file.exists()) {
            try {
                loadWaterMarks(file);
            } catch (IOException e) {
                if (fileOriginal != null && fileOriginal.exists()) {
                    loadWaterMarks(fileOriginal);
                }
            }
        }
    }
11011
def _stab_log_data(self, timestamp, data, logconf):
        """"""
        print('[%d][%s]: %s' % (timestamp, logconf.name, data))
931801
private function findSourceFiles(): void
  {
    $helper    = new SourceFinderHelper(dirname($this->configFilename));
    $filenames = $helper->findSources($this->sourcePattern);

    foreach ($filenames as $filename)
    {
      $routineName     = pathinfo($filename, PATHINFO_FILENAME);
      $this->sources[] = ['path_name'    => $filename,
                          'routine_name' => $routineName,
                          'method_name'  => $this->methodName($routineName)];
    }
  }
551721
public function recover()
	{
		// handle the error based on the config and the environment we're in
		if (static::$count <= Config::get('errors.throttle', 10))
		{
			logger(\Fuel::L_ERROR, $this->code.' - '.$this->message.' in '.$this->file.' on line '.$this->line);

			if (\Fuel::$env != \Fuel::PRODUCTION and ($this->code & error_reporting()) == $this->code)
			{
				static::$count++;
				\Error::show_php_error(new \ErrorException($this->message, $this->code, 0, $this->file, $this->line));
			}
		}
		elseif (\Fuel::$env != \Fuel::PRODUCTION
				and static::$count == (\Config::get('errors.throttle', 10) + 1)
				and ($this->severity & error_reporting()) == $this->severity)
		{
			static::$count++;
			\Error::notice('Error throttling threshold was reached, no more full error reports are shown.', true);
		}
	}
1130580
private function loadAll(): void
  {
    $this->findSourceFiles();
    $this->detectNameConflicts();
    $this->getColumnTypes();
    $this->readStoredRoutineMetadata();
    $this->getConstants();
    $this->getOldStoredRoutinesInfo();
    $this->getCorrectSqlMode();

    $this->loadStoredRoutines();

    // Drop obsolete stored routines.
    $this->dropObsoleteRoutines();

    // Remove metadata of stored routines that have been removed.
    $this->removeObsoleteMetadata();

    $this->io->writeln('');

    // Write the metadata to file.
    $this->writeStoredRoutineMetadata();
  }
643150
public function sqlDump($sorted = false, $clear = true) {
		if (!class_exists('ConnectionManager') || Configure::read('debug') < 2) {
			return;
		}
		$sources = ConnectionManager::sourceList();

		$logs = array();
		foreach ($sources as $source) {
			$db = ConnectionManager::getDataSource($source);
			if (!method_exists($db, 'getLog')) {
				continue;
			}
			$logs[$source] = $db->getLog($sorted, $clear);
		}

		if (empty($logs)) {
			return;
		}
		$this->out('<b>SQL dump:</b>');
		foreach ($logs as $source => $log) {
			$this->out("<b>Source: $source, queries: {$log['count']}, took: {$log['time']}ms</b>");

			foreach ($log['log'] as $k => $i) {
				$i += array('error' => '');
				$this->out(($k + 1) . ". {$i['query']} <sqlinfo>{e:{$i['error']}, a:{$i['affected']}, t:{$i['took']}, n:{$i['numRows']}}</sqlinfo>");
			}
		}
	}
730508
private function debug()
    {
        if (!empty($this->_errorCallbackFunction)) {
            $error = array("Error" => $this->_error);
            if (!empty($this->_sql))
                $error["SQL Statement"] = $this->_sql;
            if (!empty($this->_bind))
                $error["Bind Parameters"] = trim(print_r($this->_bind, true));

            $backtrace = debug_backtrace();
            if (!empty($backtrace)) {
                foreach ($backtrace as $info) {
                    if (isset($info["file"]) && $info["file"] != __FILE__)
                        $error["Backtrace_Line_" . $info["line"]] = $info["file"] . " at line " . $info["line"];
                }
            }

            $msg = "";

            $msg .= "SQL Error\n" . str_repeat("-", 50);
            foreach ($error as $key => $val) {
                $msg .= "\n\n$key:\n$val";
            }

            $this->logger->error($msg);
        }
    }
445651
private void fixLogging(BimServerConfig config) throws IOException {
		Path logFolder = config.getHomeDir().resolve("logs");
		if (!Files.isDirectory(logFolder)) {
			Files.createDirectories(logFolder);
		}
		Path file = logFolder.resolve("bimserver.log");

		LoggerContext lc = (LoggerContext) LoggerFactory.getILoggerFactory();
		PatternLayoutEncoder ple = new PatternLayoutEncoder();

		ple.setPattern("%date %level [%thread] %logger{10} [%file:%line] %msg%n");
		ple.setContext(lc);
		ple.start();
		FileAppender<ILoggingEvent> fileAppender = new FileAppender<ILoggingEvent>();
		String filename = file.toAbsolutePath().toString();

		if (lc instanceof LoggerContext) {
		    if (!lc.isStarted()) {
		    	lc.start();
		    }
		}
		
		System.out.println("Logging to " + filename);
		
		fileAppender.setFile(filename);
		fileAppender.setEncoder(ple);
		fileAppender.setContext(lc);
		fileAppender.start();

		for (ch.qos.logback.classic.Logger log : lc.getLoggerList()) {
			if (log.getLevel() != null) {
				log.addAppender(fileAppender);
			}
		}
	}
744363
private function loadStoredRoutines(): void
  {
    // Log an empty line.
    $this->io->writeln('');

    // Sort the sources by routine name.
    usort($this->sources, function ($a, $b) {
      return strcmp($a['routine_name'], $b['routine_name']);
    });

    // Process all sources.
    foreach ($this->sources as $filename)
    {
      $routineName = $filename['routine_name'];

      $helper = new RoutineLoaderHelper($this->io,
                                        $filename['path_name'],
                                        $this->phpStratumMetadata[$routineName] ?? null,
                                        $this->replacePairs,
                                        $this->rdbmsOldMetadata[$routineName] ?? null,
                                        $this->sqlMode,
                                        $this->characterSet,
                                        $this->collate);

      try
      {
        $this->phpStratumMetadata[$routineName] = $helper->loadStoredRoutine();
      }
      catch (RoutineLoaderException $e)
      {
        $messages = [$e->getMessage(),
                     sprintf("Failed to load file '%s'", $filename['path_name'])];
        $this->io->error($messages);

        $this->errorFilenames[] = $filename['path_name'];
        unset($this->phpStratumMetadata[$routineName]);
      }
      catch (DataLayerException $e)
      {
        if ($e->isQueryError())
        {
          // Exception is caused by a SQL error. Log the message and the SQL statement with highlighting the error.
          $this->io->error($e->getShortMessage());
          $this->io->text($e->getMarkedQuery());
        }
        else
        {
          $this->io->error($e->getMessage());
        }
      }
    }
  }
1214153
def clean_source_files(self):
        """"""

        self.build_source_files.file(File.BSFILE.SOURCESCHEMA).remove()
        self.build_source_files.file(File.BSFILE.SCHEMA).remove()
        self.commit()
283477
public void logStarted() {
    if (disableHistory) {
      return;
    }

    if (null != writers) {
      log(writers, RecordTypes.Job,
          new Keys[] {Keys.JOBID, Keys.JOB_STATUS},
          new String[] {jobId.toString(),
                        Values.RUNNING.name()});
    }
  }