Skip to content

Commit

Permalink
0.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
KanDisheng committed Feb 7, 2018
1 parent f1922b3 commit 2086f91
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
18 changes: 11 additions & 7 deletions class/Log.php
Expand Up @@ -18,6 +18,13 @@ class Log implements LogInterface
*/
private static $config = array();

/**
* Log constructor.
*/
public function __construct()
{
}

/**
* Write
* @param string $name
Expand Down Expand Up @@ -51,21 +58,16 @@ private static function write($name = '', $type = '', $message = '', $data = arr
return true;
}

/**
* Log constructor.
*/
public function __construct()
{
}

/**
* Add Config
* @param string $name
* @param string $filePath
* @return bool
*/
public static function addConfig($name = '', $filePath = 'log.log')
{
self::$config[$name] = $filePath;
return true;
}

/**
Expand All @@ -79,10 +81,12 @@ public static function getConfig()

/**
* Clear Config
* @return bool
*/
public static function clearConfig()
{
self::$config = array();
return true;
}

/**
Expand Down
3 changes: 1 addition & 2 deletions composer.json
Expand Up @@ -38,8 +38,7 @@
}
},
"require": {
"php": ">=5.3.0",
"monolog/monolog": "1.23.*"
"php": ">=5.3.0"
},
"require-dev": {
"CodeMommy/DevelopPHP": "dev-master"
Expand Down
2 changes: 2 additions & 0 deletions interface/LogInterface.php
Expand Up @@ -22,6 +22,7 @@ public function __construct();
* Add Config
* @param string $name
* @param string $filePath
* @return bool
*/
public static function addConfig($name = '', $filePath = 'log.log');

Expand All @@ -33,6 +34,7 @@ public static function getConfig();

/**
* Clear Config
* @return bool
*/
public static function clearConfig();

Expand Down
1 change: 0 additions & 1 deletion test/LogTest.php
Expand Up @@ -9,7 +9,6 @@

namespace CodeMommy\Test;

use CodeMommy\DevelopPHP\Library\Config;
use Exception;
use CodeMommy\DevelopPHP\PHPUnitBase;
use CodeMommy\LogPHP\Log;
Expand Down

0 comments on commit 2086f91

Please sign in to comment.