LaravelLog

Summary

No public properties found
No constants found
No protected properties found
N/A
No private methods found
No private properties found
N/A
File
log.php
Package
Default
Class hierarchy
LaravelLog

Tags

None found

Methods

exception()

exception(\Laravel\Exception  $e) : void

Log an exception to the log file.

Parameters

LaravelException $e

static

Tags

None found

write()

write(string  $type, string  $message,   $pretty_print = false) : void

Write a message to the log file.

// Write an "error" message to the log file Log::write('error', 'Something went horribly wrong!');

// Write an "error" message using the class' magic method
Log::error('Something went horribly wrong!');

// Log an arrays data
Log::write('info', array('name' => 'Sawny', 'passwd' => '1234', array(1337, 21, 0)), true);
 //Result: Array ( [name] => Sawny [passwd] => 1234 [0] => Array ( [0] => 1337 [1] => 21 [2] => 0 ) )
 //If we had omit the third parameter the result had been: Array

Parameters

string $type
string $message
$pretty_print

static

Tags

None found

__callStatic()

__callStatic(  $method,   $parameters) 

Dynamically write a log message.

// Write an "error" message to the log file Log::error('This is an error!');

// Write a "warning" message to the log file
Log::warning('This is a warning!');

// Log an arrays data
Log::info(array('name' => 'Sawny', 'passwd' => '1234', array(1337, 21, 0)), true);
 //Result: Array ( [name] => Sawny [passwd] => 1234 [0] => Array ( [0] => 1337 [1] => 21 [2] => 0 ) )
 //If we had omit the second parameter the result had been: Array

Parameters

$method
$parameters

static

Tags

None found

exception_line()

exception_line(\Laravel\Exception  $e) : string

Format a log friendly message from the given exception.

Parameters

LaravelException $e

Returns

string

static

Tags

None found

format()

format(string  $type, string  $message) : string

Format a log message for logging.

Parameters

string $type
string $message

Returns

string

static

Tags

None found