PHP Class MathiasGrimm\LaravelLogKeeper\Support\LogUtil

显示文件 Open project: mathiasgrimm/laravel-log-keeper Class Usage Examples

Public Methods

Method Description
diffInDays ( $log, Carbon\Carbon $date ) : integer Get the diff in days for a given file and carbon date
getCompressed ( $logs, boolean $keepIndex = false ) : mixed Get all logs that follow the daily format
getDate ( $log ) : Carbon\Carbon Get a Carbon date from the file name
getLogs ( $logs, boolean $keepIndex = false ) : mixed Get all logs that follow the daily format
mapBasename ( $logs ) : mixed Map the full path to the filename.

Method Details

diffInDays() public static method

Get the diff in days for a given file and carbon date
public static diffInDays ( $log, Carbon\Carbon $date ) : integer
$log
$date Carbon\Carbon
return integer

getCompressed() public static method

Get all logs that follow the daily format
public static getCompressed ( $logs, boolean $keepIndex = false ) : mixed
$logs
$keepIndex boolean
return mixed

getDate() public static method

Get a Carbon date from the file name
public static getDate ( $log ) : Carbon\Carbon
$log
return Carbon\Carbon

getLogs() public static method

Get all logs that follow the daily format
public static getLogs ( $logs, boolean $keepIndex = false ) : mixed
$logs
$keepIndex boolean
return mixed

mapBasename() public static method

Users/mathiasgrimm/Dropbox/Mathias/projects/github/laravel-log-keeper-with-laravel/storage/logs/laravel-2016-03-11.log will be mapped to laravel-2016-03-11.log
public static mapBasename ( $logs ) : mixed
$logs
return mixed