Permalink
Browse files

Remove SQL option from tail command because it made no sense whatsoever.

  • Loading branch information...
taylorotwell committed Oct 21, 2013
1 parent 4e631eb commit 763a02652ba23a9b61f59b47c05ab146bbe76136
Showing with 0 additions and 23 deletions.
  1. +0 −23 src/Illuminate/Foundation/Console/TailCommand.php
@@ -67,8 +67,6 @@ protected function tailLogFile($path, $connection)
*/
protected function tailLocalLogs($path)
{
if ($this->option('sql')) $this->registerQueryLogger();
$output = $this->output;
with(new Process('tail -f '.$path))->setTimeout(null)->run(function($type, $line) use ($output)
@@ -86,8 +84,6 @@ protected function tailLocalLogs($path)
*/
protected function tailRemoteLogs($path, $connection)
{
if ($this->option('sql')) $this->registerQueryLogger();
$out = $this->output;
$this->getRemote($connection)->run('tail -f '.$path, function($line) use ($out)
@@ -138,23 +134,6 @@ protected function getRoot($connection)
return $this->laravel['config']['remote.connections.'.$connection.'.root'];
}
/**
* Register a query logger for local tailing convenience.
*
* @return void
*/
protected function registerQueryLogger()
{
$app = $this->laravel;
$this->laravel['db']->listen(function($sql, $bindings, $time) use ($app)
{
$sql = str_replace_array('\?', $bindings, $sql);
$app['log']->debug($sql.' ['.$time.'ms]');
});
}
/**
* Get the console command arguments.
*
@@ -176,8 +155,6 @@ protected function getOptions()
{
return array(
array('path', null, InputOption::VALUE_OPTIONAL, 'The fully qualified path to the log file.'),
array('sql', null, InputOption::VALUE_NONE, 'Indicates if SQL queries should be logged.'),
);
}

0 comments on commit 763a026

Please sign in to comment.