Download the PHP package fmihel/console-log without Composer
On this page you can find all versions of the php package fmihel/console-log. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download fmihel/console-log
More information about fmihel/console-log
Files in fmihel/console-log
Download fmihel/console-log
More information about fmihel/console-log
Files in fmihel/console-log
Vendor fmihel
Package console-log
Short Description error,log,console,php,javascript,js,error_log,console.log,console.info
License MIT
Package console-log
Short Description error,log,console,php,javascript,js,error_log,console.log,console.info
License MIT
Please rate this library. Is it a good library?
Informations about the package console-log
console-log
Class out to error_log like as console.info from js
Install
Use
Api
name | notes | example |
---|---|---|
console::log(...$args); | out to log | console::log("text",['a',3,4]); |
console::once(...$args); | print to log only once | |
console::if(...$args); | Log output depending on condition | console::if($i>1,'out'); |
console::if(function($i,$out){ return $i>2;},$i,'out'); | ||
console::info(...$args); | clone of console::log |
console::info("text",['a',3,4]); |
console::debug(...$args); | clone of console::log |
console::debug("text",['a',3,4]); |
console::error(...$args); | add prefix [ERROR] to out and hanldler of Exception class | console::error('division by zerro'); |
Config
For config use method console::params([...]) with next params: |
name | notes | example |
---|---|---|---|
break | line break symbol | console::params(['break'=>"\n"]); | |
breakFirst | true - before print first param was out break | console::params(['breakFirst'=>true]); | |
breakOnlyComposite | break only arg or one of args is composite object (array,object,...) | console::params(['breakOnlyComposite'=>true]); | |
printParamNum | console::params(['printParamNum'=>true]); | ||
header | format for header, file can be [file,short,name] | console::params(['header'=>'[file{object}:line] ']); | |
short'=>3 | сount of dir for input when format header use short | console::params(['short'=>3]); | |
headerReplace | replace strings in header after assign format | console::params(['headerReplace'=>['from'=>['{}'],'to'=>['']]]); | |
stringQuotes | quotes for print string | console::params(['stringQuotes'=>'"']); | |
gap | margin between args if out in one line string | console::params(['gap'=>'"']); |
All versions of console-log with dependencies
PHP Build Version
Package Version
No informations.
The package fmihel/console-log contains the following files
Loading the files please wait ....