Skip to content

Commit

Permalink
Code format update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
sleemy1997 committed Sep 24, 2018
1 parent 8822067 commit 97ca092
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
10 changes: 6 additions & 4 deletions CliColor.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Date: 10/13/17
* Time: 3:17 PM
*/

namespace apollo11\cliLogger;


Expand Down Expand Up @@ -46,18 +47,19 @@ class CliColor
* @param null $backgroundColor
* @return string
*/
public static function getColoredString($string, $foregroundColor = null, $backgroundColor = null) {
public static function getColoredString($string, $foregroundColor = null, $backgroundColor = null)
{
// Set foreground color and background color
$coloredString = "";

if($foregroundColor !== null){
if ($foregroundColor !== null) {
$coloredString .= "\033[" . $foregroundColor . "m";
}
if($backgroundColor !== null) {
if ($backgroundColor !== null) {
$coloredString .= "\033[" . $backgroundColor . "m";
}

$coloredString .= $string . "\033[0m";
$coloredString .= $string . "\033[0m";

return $coloredString;
}
Expand Down
7 changes: 0 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,3 @@ logFileTemplate // log file template deafault value "{date}_{fileName}
logTextDateFormat // log text date format default value "Y-m-d H:i:s"
logTextTemplate // log text template default value "[ {date} | {type} ] - {message} " . PHP_EOL
```


For delete log file every x day use:

'fileCreateType' => 3,
'fileReCreateMinutes' => (integer) time in minutes,
'saveLatestFileNumber' => (integer) number how much files to keep

0 comments on commit 97ca092

Please sign in to comment.