razxc/telescope
Composer 安装命令:
composer require razxc/telescope
包简介
Alerting, collecting and tracking for errors in production and development
关键字:
README 文档
README
The tool with zero-dependencies for error alerting, collecting and tracking in stages of development and maintenance.
Install
composer require razxc/telescope cp vendor/razxc/telescope/sample.telescope.ini .telescope.ini
Usage in production mode
require_once __DIR__ . '/vendor/autoload.php'; use net\example\SiteApp; use razxc\telescope\Telescope as T; T::init(__DIR__ . '/.telescope.ini'); // Your application start... SiteApp::run();
Usage in development mode
require_once __DIR__ . '/vendor/autoload.php'; use net\example\SiteApp; use razxc\telescope\Telescope as T; T::init(__DIR__ . '/.telescope.ini', T::MODE_TRACING + T::MODE_DISPLAY + T::MODE_LOG); putenv('TELESCOPE_REPORT_URL=/.telescope-secret-page.html?nocache=' . time()); putenv('TELESCOPE_REPORT_DIR=' . __DIR__ . '/wwwroot'); putenv('TELESCOPE_REPORT_TPL=' . __DIR__ . '/vendor/razxc/telescope/src/tpls/details-page.tpl.php'); T::onShutdown(static function() { $paths = explode(PATH_SEPARATOR, get_include_path()); T::shoot($paths, 'PHP included paths'); $reportUrl = getenv('TELESCOPE_REPORT_URL'); if (!$reportUrl) { return; } $reportDir = getenv('TELESCOPE_REPORT_DIR'); $urlPath = parse_url($reportUrl, PHP_URL_PATH); $reportFile = rtrim($reportDir, '/') . '/' . basename($urlPath); if (!is_writable($reportFile)) { return; } $reportHtml = T::buildDetailReport([ 'tpl_path' => getenv('TELESCOPE_REPORT_TPL'), ]); T::shootQueries(QueryConnection::getQueriesInfo()); T::log($reportHtml, $reportFile, 'w+', false); }); // Your application start... SiteApp::runInDevMode();
Testing
cp sample.telescope.ini .telescope.ini mkdir --parent var/logs mkdir -m 755 -p ./.mail/letters && touch ./.mail/letters_num && chmod 644 ./.mail/letters_num # fake-sendmail.sh rm -rf composer.lock #composer require --dev phpunit/phpunit:10 # >= PHP 8.1 composer require --dev phpunit/phpunit:13 # >= PHP 8.4 ./vendor/bin/phpunit
razxc/telescope 适用场景与选型建议
razxc/telescope 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 03 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「debug」 「profiler」 「notification」 「maintenance」 「environment」 「debugger」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 razxc/telescope 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 razxc/telescope 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 razxc/telescope 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
g4 application profiler package
Debug your SimpleBus EventBus and CommandBus
nice output for debug functions for PHP 5.3
This package makes it easy to send notifications via AfricasTalking with Laravel
Apple Push Notification & Feedback Provider
Analysis module for finding problematical shop data.
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 42
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-03-30