ddup/logger

There is no license information available for the latest version (v1.1) of this package.

日志

v1.1 2020-06-21 12:59 UTC

This package is auto-updated.

Last update: 2021-02-09 11:46:17 UTC


README

composer require ddup/logger
function getLogger($client){
    switch ($client){
        case "ali":
            return new \Ddup\Logger\Aliyun\AliyunLogger(
                new \Ddup\Logger\Aliyun\Config\AliyunLogStruct(
                    [
                        'access_key_id'     => '',
                        'access_key_secret' => '',
                        'endpoint'          => '',
                        'project'           => '',
                        'store'             => '',
                        'topic'             => ''
                    ]
                ));
        break;
        case "lazy":
            return new \Ddup\Logger\Cli\LazyLogger;
        break;
        default:
            return  new \Ddup\Logger\Cli\CliLogger;
    }   
}
getLogger("lazy")->info('不处理', [
    'con' => '登高一呼时才懂,始终在为你心痛'
]);

getLogger("ali")->info('写入阿里云', [
    'con' => '登高一呼时才懂,始终在为你心痛'
]);

getLogger("cli")->info('输出到终端', [
    'con' => '登高一呼时才懂,始终在为你心痛'
]);