Base 包
安装包含本地参考和全部已发布模式的完整包。
install loglog用
运行日志会持续增长,通常远多于一次诊断真正需要的数据。
log [<file>|<dir>] [-h] [-n <lines>] [-g <text>] [-i] [-l] [-r]log显示最新检测到的日志
log <file>读取指定日志文件
log <dir>在指定目录中查找日志
log -l列出检测到的日志
log <dir> -l列出目录内的日志
-h从文件开头读取
-n <lines>显示 1–50000 行实际文本
-g <text>筛选包含指定字面文本的行
-i与 -g 一起使用时忽略大小写
-r显示未经分组的原始行
可直接在页面中运行预先准备的示例。结果已预先生成并在浏览器中显示;服务器不会执行任何终端命令。
安装当前兼容版本。完整功能请选择 Base,精简包请选择 Minimum;已安装模块的更新请使用 upgrade。
Base 与 Minimum 是同一当前模块版本的两个包。
安装包含本地参考和全部已发布模式的完整包。
install log安装精简包。该包不包含本地参考;
install log -m安装这个确切的已发布版本。
install log -v 1.3.1让 upgrade 检查兼容性,仅在需要时替换已安装块。
upgrade log删除扩展块,不影响核心和其他模块。
install log -u示例可复制,但网站不会执行。请先检查路径、权限和破坏性选项。
log sandbox/logs/review.log教学示例 — PHP 环境、服务器和仓库响应为模拟数据
File: sandbox/logs/review.log
[20-Oct-2026 08:00:00 UTC]
PHP Notice: request started in /sandbox/src/start.php on line 12
[20-Oct-2026 08:00:01 UTC]
PHP Warning: missing configuration in /sandbox/src/config.php on line 18
Stack trace:
#0 /sandbox/src/index.php(20): loadSettings()
[20-Oct-2026 08:00:02 UTC]
PHP Debug: using fallback configuration
[20-Oct-2026 08:00:03 UTC]
PHP Fatal error: unable to initialize test connection in /sandbox/src/db.php on line 41
Stack trace:
#0 /sandbox/src/index.php(31): connect()log sandbox/logs/review.log -h教学示例 — PHP 环境、服务器和仓库响应为模拟数据
File: sandbox/logs/review.log
[20-Oct-2026 08:00:00 UTC]
PHP Notice: request started in /sandbox/src/start.php on line 12
[20-Oct-2026 08:00:01 UTC]
PHP Warning: missing configuration in /sandbox/src/config.php on line 18
Stack trace:
#0 /sandbox/src/index.php(20): loadSettings()
[20-Oct-2026 08:00:02 UTC]
PHP Debug: using fallback configuration
[20-Oct-2026 08:00:03 UTC]
PHP Fatal error: unable to initialize test connection in /sandbox/src/db.php on line 41
Stack trace:
#0 /sandbox/src/index.php(31): connect()log sandbox/logs/review.log -t教学示例 — PHP 环境、服务器和仓库响应为模拟数据
File: sandbox/logs/review.log
[20-Oct-2026 08:00:00 UTC]
PHP Notice: request started in /sandbox/src/start.php on line 12
[20-Oct-2026 08:00:01 UTC]
PHP Warning: missing configuration in /sandbox/src/config.php on line 18
Stack trace:
#0 /sandbox/src/index.php(20): loadSettings()
[20-Oct-2026 08:00:02 UTC]
PHP Debug: using fallback configuration
[20-Oct-2026 08:00:03 UTC]
PHP Fatal error: unable to initialize test connection in /sandbox/src/db.php on line 41
Stack trace:
#0 /sandbox/src/index.php(31): connect()log sandbox/logs/review.log -n 2教学示例 — PHP 环境、服务器和仓库响应为模拟数据
File: sandbox/logs/review.log
Stack trace:
#0 /sandbox/src/index.php(31): connect()log sandbox/logs/review.log -h -n 2教学示例 — PHP 环境、服务器和仓库响应为模拟数据
File: sandbox/logs/review.log
[20-Oct-2026 08:00:00 UTC]
PHP Notice: request started in /sandbox/src/start.php on line 12
[20-Oct-2026 08:00:01 UTC]
PHP Warning: missing configuration in /sandbox/src/config.php on line 18log sandbox/logs/review.log -g Warning教学示例 — PHP 环境、服务器和仓库响应为模拟数据
File: sandbox/logs/review.log
Filter: Warning
[20-Oct-2026 08:00:01 UTC]
PHP Warning: missing configuration in /sandbox/src/config.php on line 18log sandbox/logs/review.log -g warning -i教学示例 — PHP 环境、服务器和仓库响应为模拟数据
File: sandbox/logs/review.log
Filter: warning
[20-Oct-2026 08:00:01 UTC]
PHP Warning: missing configuration in /sandbox/src/config.php on line 18log sandbox/logs/review.log -g DEBUG教学示例 — PHP 环境、服务器和仓库响应为模拟数据
File: sandbox/logs/review.log
Filter: DEBUG
[no matching lines]log sandbox/logs/review.log -g error -i -r教学示例 — PHP 环境、服务器和仓库响应为模拟数据
File: sandbox/logs/review.log
Filter: error
[20-Oct-2026 08:00:03 UTC] PHP Fatal error: unable to initialize test connection in /sandbox/src/db.php on line 41log sandbox/logs/review.log -r教学示例 — PHP 环境、服务器和仓库响应为模拟数据
File: sandbox/logs/review.log
[20-Oct-2026 08:00:00 UTC] PHP Notice: request started in /sandbox/src/start.php on line 12
[20-Oct-2026 08:00:01 UTC] PHP Warning: missing configuration in /sandbox/src/config.php on line 18
Stack trace:
#0 /sandbox/src/index.php(20): loadSettings()
[20-Oct-2026 08:00:02 UTC] PHP Debug: using fallback configuration
[20-Oct-2026 08:00:03 UTC] PHP Fatal error: unable to initialize test connection in /sandbox/src/db.php on line 41
Stack trace:
#0 /sandbox/src/index.php(31): connect()log -l教学示例 — PHP 环境、服务器和仓库响应为模拟数据
2026-11-01 12:00:00 96 B sandbox/logs/app.log
2026-11-01 12:00:00 219 B sandbox/logs/errors.log
2026-10-20 08:00:00 487 B sandbox/logs/review.loglog sandbox -l教学示例 — PHP 环境、服务器和仓库响应为模拟数据
2026-11-01 12:00:00 96 B sandbox/logs/app.log
2026-11-01 12:00:00 219 B sandbox/logs/errors.log
2026-10-20 08:00:00 487 B sandbox/logs/review.loglog sandbox教学示例 — PHP 环境、服务器和仓库响应为模拟数据
File: sandbox/logs/app.log
2026-01-01T00:00:00Z INFO sandbox initialized
2026-01-01T00:00:01Z DEBUG sample event completedlog sandbox/logs/review.log -g no-such-event教学示例 — PHP 环境、服务器和仓库响应为模拟数据
File: sandbox/logs/review.log
Filter: no-such-event
[no matching lines]log sandbox/logs/missing.log教学示例 — PHP 环境、服务器和仓库响应为模拟数据
Log file not foundlog sandbox/logs/review.log -n 0教学示例 — PHP 环境、服务器和仓库响应为模拟数据
Line count must be between 1 and 50000log sandbox/logs/review.log -n 50001教学示例 — PHP 环境、服务器和仓库响应为模拟数据
Line count must be between 1 and 50000log sandbox/logs/review.log -n abc教学示例 — PHP 环境、服务器和仓库响应为模拟数据
Invalid line countlog sandbox/logs/review.log -i教学示例 — PHP 环境、服务器和仓库响应为模拟数据
Option -i requires -g <text>log sandbox/logs/review.log -g教学示例 — PHP 环境、服务器和仓库响应为模拟数据
Search text is requiredlog sandbox/logs/review.log -z教学示例 — PHP 环境、服务器和仓库响应为模拟数据
Unknown option: -zlog sandbox/logs/review.log -l教学示例 — PHP 环境、服务器和仓库响应为模拟数据
List mode accepts a directory, not a filelog sandbox -l -g error教学示例 — PHP 环境、服务器和仓库响应为模拟数据
List mode does not accept a search filterlog sandbox/logs/review.log sandbox/logs/review.log教学示例 — PHP 环境、服务器和仓库响应为模拟数据
Too many pathssandbox/logs/app.log该示例使用受保护的 /sandbox/ 文档工作区中的文件或目录。
2026-01-01T00:00:00Z INFO sandbox initialized
2026-01-01T00:00:01Z DEBUG sample event completed