Skip to content

G-YDG/monolog-aliyun-log

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Monolog Aliyu Log

Installation

Install the latest version with

$ composer require ydg/monolog-aliyun-log

Basic Usage

<?php

use Monolog\Logger;
use Hdk\MonologAliyunLog\AliyunLogHelper;

$config = [
    'endpoint' => 'your endpoint',
    'accessKeyId' => 'your accessKeyId',
    'accessKey' => 'your accessKey',
    'project' => 'your project',
    'logstore' => 'your logstore',
];

$log = new Logger('name');
$log->pushHandler(AliyunLogHelper::getLogHandler(AliyunLogHelper::getLogClient($config), $config));

// add records to the log
$log->warning('Foo');
$log->error('Bar');

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages