Show migration info.

@param $output
@param int $level
771658
public function showMigratingInfo($output, $level = 0)
    {
        $output->info(
            str_repeat("_",$level) . 'Migrating ' . class_basename($this) . ' ('. $this->id . ' | ' . $this->academic_period_id .
            ') | Group ' . $this->group->name . ' ('. $this->group->id .
            ') | Teacher ' . $this->teacher->name . ' ('. $this->teacher->id .
            ') | Module ' . $this->study_module->name . ' ('. $this->study_module->id .
            ') | Location ' . $this->location->name . ' ('. $this->location->id .
            ') | Day ' . $this->day .
            '  | Timeslot ' . $this->time_slot_id .
            '...'
        );
    }
456858
public function log($message, $level = 0) {
        foreach ($this->_loggers as $logger) {
            try {
                $logger->logMessage($message, $level);
            } catch (LoggerException $e) {
                throw $e;
            }
        }
    }
383482
protected function getTableMigrationNewTables($output, $new, $old)
    {
        if (empty($new['tables'])) {
            return $output;
        }
        foreach ($new['tables'] as $tableName => $table) {
            if ($tableName === $this->options['default_migration_table']) {
                continue;
            }

            if (!isset($old['tables'][$tableName])) {
                // create the table
                $table['has_table_variable'] = true;
                $output = $this->getCreateTable($output, $table, $tableName);
            }

            $output = $this->getTableMigrationNewTablesColumns($output, $table, $tableName, $new, $old);
            $output = $this->getTableMigrationOldTablesColumns($output, $tableName, $new, $old);
            $output = $this->getTableMigrationIndexes($output, $table, $tableName, $new, $old);
        }

        return $output;
    }
62321
protected function listExport(OutputInterface $output)
    {
        $table = new Table($output);

        foreach ((new ExportQuery)->find() as $export) {
            $table->addRow([
                $export->getRef(),
                $export->getTitle(),
                $export->getDescription()
            ]);
        }

        $table
            ->setHeaders([
                'Reference',
                'Title',
                'Description'
            ])
            ->render()
        ;
    }
41777
protected function printDbBuildVersion(OutputInterface $output) : void
    {
        $output->writeln(
            sprintf(
                '<info>Reference Database Version</info> => %s%s',
                $this->getApplication()->getDbVersions()['build.version'],
                PHP_EOL

            )
        );
    }
446264
public function processOutput($output)
	{
		$output=$this->transform($output);
		if($this->purifyOutput)
		{
			$purifier=new CHtmlPurifier;
			$output=$purifier->purify($output);
		}
		parent::processOutput($output);
	}
1066134
public function execute(InputInterface $input, OutputInterface $output)
    {
        $this->createAppMigrationsTable();

        $migrations = $this->migrationsToRun();

        usort($migrations, function ($a, $b) {
            return strcmp($a->getTimestamp(), $b->getTimestamp());
        });

        $count     = 0;
        $totalTime = 0;
        foreach ($migrations as $migration) {
            $output->writeln(sprintf(
                '  * STARTING *  %s (%s)',
                $migration->getDescription(),
                $migration->getTimestamp()
            ));
            $start = microtime(true);

            $migration->execute($this->db);

            $time = microtime(true) - $start;
            $totalTime += $time;
            $output->writeln(sprintf(
                '  * DONE *  %s (%s) - Took %.2fs',
                $migration->getDescription(),
                $migration->getTimestamp(),
                $time
            ));

            $this->recordMigration($migration);

            $count++;
        }

        if ($count === 0) {
            $message = '  No new migrations to run';
        } else {
            $message = sprintf('  Executed %d migrations in %.2fs', $count, $totalTime);
        }

        $output->writeln([$message, ''], true);
    }
1308607
private function scan($data,$level) {
		if (!isset($data[0])){
			$data = array($data);
		}
		foreach($data as $key => $record){
			 $this->extract($record,$level);	
		}
	}
960818
public function log($message, $level = LogLevel::DEBUG)
    {
        $this->runtime->log($message, $level);
    }
193830
protected function migrateTeachers()
    {
        $this->output->info('### Migrating teachers ###');
        foreach ($this->teachers() as $teacher) {
            $this->showMigratingInfo($teacher, 1);
            $this->output->info('  email: ' . $teacher->email);
            $this->migrateTeacher($teacher);
        }
        $this->output->info(
            '### END Migrating teachers. Migrated ' . count($this->teachers()) .  ' teachers   ###');
    }
722651
public function sendMessage($level, $message)
    {
        $this->db->insert($this->tableName, [
            'level' => $level,
            'message' => $message,
            'date_create' => $_SERVER['REQUEST_TIME']
        ]);
    }
904914
protected function logMessage($level, $message)
    {
        if (array_search($level, $this->levels) > $this->levelPosition) {
            return;
        }

        echo $message;
    }
938589
public function log($msg, $level = Project::MSG_INFO)
    {
        $this->logObject($this, $msg, $level);
    }
508811
private function _log($level, $message)
    {
        $level_config = Config::get("log_level");
        if (!$level_config) {
            $level_config = "DEBUG";
        }

        $level_val = self::$levels[$level];
        $level_config = self::$levels[$level_config];

        if ($level_config > $level_val) {
            return ;
        }

        wlog($level, $message);
    }
135008
private function updateLevel()
    {
        if (null === $this->output or OutputInterface::VERBOSITY_QUIET === ($verbosity = $this->output->getVerbosity())) {
            return false;
        }

        $this->setLevel(Logger::DEBUG);
        return true;
    }
987664
public function log($level, $message, $object = '')
    {
        if ($this->shouldIgnoreThisLog($level)) {
            return;
        }
        $msg = $this->generateLog($level, $message, $object);
        $target_file = $this->decideTargetFile();
        if (!$target_file) {
            echo $msg;
            return;
        }
        @file_put_contents($target_file, $msg, FILE_APPEND);
    }
70797
private function log($mesg, $level)
    {
        if ($this->record && ($level <= $this->loglevel) && $this->out != null) {
            $this->out->write($mesg . PHP_EOL);
        }
    }