isbkch/laravel5-tail
Composer 安装命令:
composer require isbkch/laravel5-tail
包简介
A tail command for Laravel 5
README 文档
README
This package adds the tail command to Laravel 5. This package works for daily and single logs and has support for tailing local and the remote logs.
Install
You can install the package via composer:
composer require isbkch/laravel5-tail
You must install this service provider:
// config/app.php 'providers' => [ ... Isbkch\Tail\TailServiceProvider::class, ... ];
If you're planning on tailing remote logs you must publish the config file with this command:
php artisan vendor:publish --provider="Isbkch\Tail\TailServiceProvider"
A file named tail.php will be created in the config directory. The options you can set in the file should be self-explanatory.
PS: You can get the username from the .env file
return [ 'connections' => [ /* * The environment name. You can use this value in the tail command. */ 'production' => [ // Hostname of the server where the logs are located 'host' => '', // Username to be used when connecting to the server where the logs are located 'user' => env('TAIL_USERNAME', 'isbkch'), // Full path to the directory where the logs are located 'logDirectory' => '', ], // Change it to 'true' if you have grc (Generic Colouriser) installed in your system // To install grc on Debian based: sudo apt-get install grc 'grc' => 'false' ], ];
Usage
To tail the local log you can use this command:
php artisan tail
By default the last 20 lines will be shown. You can change that number by using the lines-option.
php artisan tail --lines=50
To tail a remote log you must first specify hostname and logDirectory in the config-file. After you've done that you can tail the remote logs by specify the environment as an argument.
php artisan tail production
Credits
License
The MIT License (MIT). Please see License File for more information.
isbkch/laravel5-tail 适用场景与选型建议
isbkch/laravel5-tail 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.27k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2016 年 04 月 26 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「log」 「tail」 「laravel 5」 「laravel5-tail」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 isbkch/laravel5-tail 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 isbkch/laravel5-tail 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 isbkch/laravel5-tail 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Provide artisan command to monitor realtime database query executed from the application. Able to automatically run explain command for each of query received.
Tac and tail library.
Stackdriver handler for Monolog (codeinternetapplications/monolog-stackdriver Fork).
Laravel 5.x.x library for integration Monolog Sentry
Easily delve into your Laravel application's log files directly from the command line.
Pacote simplificado para persistência de logs
统计信息
- 总下载量: 1.27k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-04-26