Skip to content

Commit abff7d8

Browse files
committed
Merge branch 'master' into develop
2 parents cb567c5 + ff7f6f6 commit abff7d8

File tree

3 files changed

+20
-5
lines changed

3 files changed

+20
-5
lines changed

laravel/core.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@
171171

172172
if (Request::cli())
173173
{
174-
$environment = get_cli_option('env');
174+
$environment = get_cli_option('env', getenv('LARAVEL_ENV'));
175175

176-
if ( ! isset($environment))
176+
if (empty($environment))
177177
{
178178
$environment = Request::detect_env($environments, gethostname());
179179
}
@@ -240,4 +240,4 @@
240240
foreach ($bundles as $bundle => $config)
241241
{
242242
Bundle::register($bundle, $config);
243-
}
243+
}

laravel/log.php

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,14 +33,21 @@ protected static function exception_line($e)
3333
*
3434
* // Write an "error" message using the class' magic method
3535
* Log::error('Something went horribly wrong!');
36+
*
37+
* // Log an arrays data
38+
* Log::write('info', array('name' => 'Sawny', 'passwd' => '1234', array(1337, 21, 0)), true);
39+
* //Result: Array ( [name] => Sawny [passwd] => 1234 [0] => Array ( [0] => 1337 [1] => 21 [2] => 0 ) )
40+
* //If we had omit the third parameter the result had been: Array
3641
* </code>
3742
*
3843
* @param string $type
3944
* @param string $message
4045
* @return void
4146
*/
42-
public static function write($type, $message)
47+
public static function write($type, $message, $pretty_print = false)
4348
{
49+
$message = ($pretty_print) ? print_r($message, true) : $message;
50+
4451
// If there is a listener for the log event, we'll delegate the logging
4552
// to the event and not write to the log files. This allows for quick
4653
// swapping of log implementations for debugging.
@@ -75,11 +82,18 @@ protected static function format($type, $message)
7582
*
7683
* // Write a "warning" message to the log file
7784
* Log::warning('This is a warning!');
85+
*
86+
* // Log an arrays data
87+
* Log::info(array('name' => 'Sawny', 'passwd' => '1234', array(1337, 21, 0)), true);
88+
* //Result: Array ( [name] => Sawny [passwd] => 1234 [0] => Array ( [0] => 1337 [1] => 21 [2] => 0 ) )
89+
* //If we had omit the second parameter the result had been: Array
7890
* </code>
7991
*/
8092
public static function __callStatic($method, $parameters)
8193
{
82-
static::write($method, $parameters[0]);
94+
$parameters[1] = (empty($parameters[1])) ? false : $parameters[1];
95+
96+
static::write($method, $parameters[0], $parameters[1]);
8397
}
8498

8599
}

laravel/profiling/profiler.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
right:0 !important;
1414
width:100%;
1515
z-index: 9999 !important;
16+
color: #000;
1617
}
1718

1819
.anbu-tabs

0 commit comments

Comments
 (0)