oanhnn/laravel-logzio
最新稳定版本:v1.1.1
Composer 安装命令:
composer require oanhnn/laravel-logzio
包简介
Integrate Logz.io into PHP and Laravel 5.6+ Application
README 文档
README
Easy integrate Logz.io into PHP and Laravel 5.6+ Application
Main features
- Make Logz.io handler for Monolog
- Make
logziodriver for integrate Logz.io into Laravel Application
Requirements
- php >=7.1.3
- Laravel 6.0+ (when using with Laravel)
We tested with Laravel 6.0+ and php 7.2+ . But it can working with Laravel 5.6+ and php >= 7.1.3
Installation
Begin by pulling in the package through Composer.
$ composer require oanhnn/laravel-logzio
Usage
PHP (non Laravel)
<?php use Laravel\Logzio\Log\Handler; use Monolog\Logger; $config = [ 'token' => '...', 'type' => 'http-bulk', 'ssl' => true, 'region' => '', ]; $logger = new Logger('log-name'); $logger->pushHandler(new Handler(Logger::DEBUG, true, $config); $logger->info('Some message');
Laravel
In config/logging.php file, config you log with driver logzio
<?php return [ // ... 'custom' => [ 'driver' => 'logzio', 'name' => 'channel-name', 'token' => 'logz-access-token', 'type' => 'http-bulk', 'ssl' => true, 'level' => 'info', 'bubble' => true, 'region' => 'eu', // leave empty for default region 'timestamp_format' => '', // leave empty for default format (requires UTC time) ], // ... ];
In your code using
Log::channel('custom')->info('Some message');
See more in Laravel document
Changelog
See all change logs in CHANGELOG
Testing
$ git clone git@github.com/oanhnn/laravel-logzio.git /path $ cd /path $ composer install $ composer test
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email to Oanh Nguyen instead of using the issue tracker.
Credits
License
This project is released under the MIT License.
Copyright © 2020 Oanh Nguyen.
统计信息
- 总下载量: 61.29k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-05-18