PHP Interface Arcanedev\LogViewer\Contracts\LogViewer

Author: ARCANEDEV ([email protected])
Inheritance: extends Arcanedev\LogViewer\Contracts\Patternable
Show file Open project: ARCANEDEV/LogViewer Interface Usage Examples

Public Methods

Method Description
all ( ) : Arcanedev\LogViewer\Entities\LogCollection Get all logs.
count ( ) : integer Get logs count.
dates ( ) : array List the log files (only dates).
delete ( string $date ) : boolean Delete the log.
download ( string $date, string | null $filename = null, array $headers = [] ) : BinaryFileResponse Download a log file.
entries ( string $date, string $level = 'all' ) : Arcanedev\LogViewer\Entities\LogEntryCollection Get the log entries.
files ( ) : array List the log files.
get ( string $date ) : Arcanedev\LogViewer\Entities\Log Get a log.
isEmpty ( ) : boolean Determine if the log folder is empty or not.
levels ( boolean | false $flip = false ) : array Get the log levels.
levelsNames ( string | null $locale = null ) : array Get the translated log levels.
menu ( boolean | true $trans = true ) : array Get logs menu.
paginate ( integer $perPage = 30 ) : Illuminate\Pagination\LengthAwarePaginator Paginate all logs.
setPath ( string $path ) : Arcanedev\LogViewer\LogViewer Set the log storage path.
stats ( ) : array Get logs statistics.
statsTable ( string | null $locale = null ) : StatsTable Get logs statistics table.
total ( string $level = 'all' ) : integer Get entries total from all logs.
tree ( boolean | false $trans = false ) : array Get logs tree.
version ( ) : string Get the LogViewer version.

Method Details

all() public method

Get all logs.
public all ( ) : Arcanedev\LogViewer\Entities\LogCollection
return Arcanedev\LogViewer\Entities\LogCollection

count() public method

Get logs count.
public count ( ) : integer
return integer

dates() public method

List the log files (only dates).
public dates ( ) : array
return array

delete() public method

Delete the log.
public delete ( string $date ) : boolean
$date string
return boolean

download() public method

Download a log file.
public download ( string $date, string | null $filename = null, array $headers = [] ) : BinaryFileResponse
$date string
$filename string | null
$headers array
return Symfony\Component\HttpFoundation\BinaryFileResponse

entries() public method

Get the log entries.
public entries ( string $date, string $level = 'all' ) : Arcanedev\LogViewer\Entities\LogEntryCollection
$date string
$level string
return Arcanedev\LogViewer\Entities\LogEntryCollection

files() public method

List the log files.
public files ( ) : array
return array

get() public method

Get a log.
public get ( string $date ) : Arcanedev\LogViewer\Entities\Log
$date string
return Arcanedev\LogViewer\Entities\Log

isEmpty() public method

Determine if the log folder is empty or not.
public isEmpty ( ) : boolean
return boolean

levels() public method

Get the log levels.
public levels ( boolean | false $flip = false ) : array
$flip boolean | false
return array

levelsNames() public method

Get the translated log levels.
public levelsNames ( string | null $locale = null ) : array
$locale string | null
return array

menu() public method

Get logs menu.
public menu ( boolean | true $trans = true ) : array
$trans boolean | true
return array

paginate() public method

Paginate all logs.
public paginate ( integer $perPage = 30 ) : Illuminate\Pagination\LengthAwarePaginator
$perPage integer
return Illuminate\Pagination\LengthAwarePaginator

setPath() public method

Set the log storage path.
public setPath ( string $path ) : Arcanedev\LogViewer\LogViewer
$path string
return Arcanedev\LogViewer\LogViewer

stats() public method

Get logs statistics.
public stats ( ) : array
return array

statsTable() public method

Get logs statistics table.
public statsTable ( string | null $locale = null ) : StatsTable
$locale string | null
return Arcanedev\LogViewer\Tables\StatsTable

total() public method

Get entries total from all logs.
public total ( string $level = 'all' ) : integer
$level string
return integer

tree() public method

Get logs tree.
public tree ( boolean | false $trans = false ) : array
$trans boolean | false
return array

version() public method

Get the LogViewer version.
public version ( ) : string
return string