Supports
[](https://github.com/yansongda/supports/actions)
[](https://github.com/yansongda/supports/actions)
[](https://packagist.org/packages/yansongda/supports)
[](https://packagist.org/packages/yansongda/supports)
[](https://packagist.org/packages/yansongda/supports)
[](https://packagist.org/packages/yansongda/supports)
handle with array/config/log/guzzle etc.
## About log
```PHP
use Yansongda\Supports\Logger as Log;
use Monolog\Logger;
class ApplicationLogger
{
private static $logger;
/**
* Forward call.
*
* @author yansongda
*
* @return mixed
*/
public static function __callStatic(string $method, array $args)
{
return call_user_func_array([self::getLogger(), $method], $args);
}
/**
* Forward call.
*
* @author yansongda
*
* @return mixed
*/
public function __call(string $method, array $args)
{
return call_user_func_array([self::getLogger(), $method], $args);
}
/**
* Make a default log instance.
*
* @author yansongda
*
* @return Log
*/
public static function getLogger()
{
if (! self::$logger instanceof Logger) {
self::$logger = new Log();
}
return self::$logger;
}
}
```
### Usage
After registerLog, you can use Log service:
```PHP
ApplicationLogger::debug('test', ['test log']);
```