- API
- 鉴权
- 元数据
- 基本统计
- 封禁
- 下载器
- 推送渠道
- 通用
- 功能模块
- 警报
- 程序日志
- 统计图表(基础)
- PBH Plus
- Torrent
- 图表
- Peer
- 工具
- 下载器兼容层
获取程序日志
GET
http://127.0.0.1:9897/api/logs/history
最后修改时间:2024-10-25 16:49:17
责任人:未设置
根据平台不同,可能使用不同的换行符(Windows:
\r\n
,Linux:\n
)。请求参数
Authorization
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token示例:
Authorization: Bearer ********************
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'http://127.0.0.1:9897/api/logs/history'
返回响应
🟢200成功
application/json
Body
success
boolean
必需
message
null
必需
data
array [object {3}]
历史日志
content
string
内容
level
string
日志级别
offset
integer
offset
示例
{"success":true,"message":null,"data":[{"content":"[00:47:35] [main/INFO]: Loading configuration...","level":"INFO","offset":1},{"content":"[00:47:36] [main/INFO]: PeerBanHelper data directory: F:\\IdeaProjects\\PeerBanHelper\\data","level":"INFO","offset":2},{"content":"[00:47:36] [main/INFO]: Checking configuration...","level":"INFO","offset":3},{"content":"[00:47:36] [main/INFO]: Saving configuration changes...","level":"INFO","offset":4},{"content":"[00:47:36] [main/INFO]: Checking configuration...","level":"INFO","offset":5},{"content":"[00:47:36] [main/INFO]: Saving configuration changes...","level":"INFO","offset":6},{"content":"[00:47:36] [main/INFO]: Current system language tag: zh-CN","level":"INFO","offset":7},{"content":"[00:47:37] [main/INFO]: Loading up translations, this may need a while...","level":"INFO","offset":8},{"content":"[00:47:38] [main/INFO]: Spring Context 正在进行上下文装配以启动 PeerBanHelper,在低端设备上可能需要一段时间","level":"INFO","offset":9},{"content":"[00:47:39] [main/INFO]: PeerBanHelper SQLite Connection Pool - Starting...","level":"INFO","offset":10},{"content":"[00:47:39] [main/INFO]: PeerBanHelper SQLite Connection Pool - Added connection org.sqlite.jdbc4.JDBC4Connection@463045fb","level":"INFO","offset":11},{"content":"[00:47:39] [main/INFO]: PeerBanHelper SQLite Connection Pool - Start completed.","level":"INFO","offset":12},{"content":"[00:47:39] [virtual-62/INFO]: 已清理 0 条历史警报记录","level":"INFO","offset":13},{"content":"[00:47:39] [virtual-70/INFO]: [清理] 已清理 0 条封禁日志","level":"INFO","offset":14},{"content":"[00:47:40] [main/INFO]: 捐赠密钥激活成功!感谢捐赠!授权给:c1a21dd40b3b11e9aa9552540025c377 (PBH-BTN ALIS),过期时间:2124-08-18 03:05:19","level":"INFO","offset":15},{"content":"[00:47:40] [main/INFO]: [BTN 网络] 请等待我们连接到 BTN 网络……","level":"INFO","offset":16},{"content":"[00:47:42] [main/INFO]: [BTN 网络] 功能已启用","level":"INFO","offset":17},{"content":"[00:47:42] [main/INFO]: EcoQoS API 加载成功,Windows 效能模式已应用至 PeerBanHelper 以降低系统能耗","level":"INFO","offset":18},{"content":"[00:47:42] [main/INFO]: PeerBanHelper v7.0.0-24w43k - by PBH-BTN Community, Made with Sugar & Love","level":"INFO","offset":19},{"content":"[00:47:43] [main/INFO]: + BitComet -> bitcomet (http://127.0.0.1:10047)","level":"INFO","offset":20},{"content":"[00:47:43] [main/INFO]: + qBittorrent -> myqb (http://localhost:8568)","level":"INFO","offset":21},{"content":"[00:47:43] [main/INFO]: [BanListInvoker] 已注册:com.ghostchu.peerbanhelper.invoker.impl.IPFilterInvoker","level":"INFO","offset":22},{"content":"[00:47:43] [main/INFO]: 请等待功能模块初始化……","level":"INFO","offset":23},{"content":"[00:47:43] [main/INFO]: [注册] IP Blacklist","level":"INFO","offset":24},{"content":"[00:47:43] [main/INFO]: [注册] PeerId Blacklist","level":"INFO","offset":25},{"content":"[00:47:43] [main/INFO]: [注册] ClientName Blacklist","level":"INFO","offset":26},{"content":"[00:47:43] [main/INFO]: 请稍等,规则引擎正在编译用户脚本以提高执行性能,这可能需要一点时间……","level":"INFO","offset":27},{"content":"[00:47:43] [main/INFO]: 已成功编译 4 条用户脚本,耗时 28ms","level":"INFO","offset":28},{"content":"[00:47:43] [main/INFO]: [注册] Expression Engine","level":"INFO","offset":29},{"content":"[00:47:43] [main/INFO]: [注册] Progress Cheat Blocker","level":"INFO","offset":30},{"content":"[00:47:43] [main/INFO]: [注册] Multi Dialing Blocker","level":"INFO","offset":31},{"content":"[00:47:43] [main/INFO]: [注册] Auto Range Ban","level":"INFO","offset":32},{"content":"[00:47:43] [main/INFO]: [注册] BTN Network Online Rules","level":"INFO","offset":33},{"content":"[00:47:43] [main/INFO]: [注册] WebAPI - Downloader CIDR Blocklist","level":"INFO","offset":34},{"content":"[00:47:43] [main/INFO]: [注册] IP Blacklist Rule List","level":"INFO","offset":35},{"content":"[00:47:43] [virtual-97/INFO]: IP黑名单规则订阅完毕","level":"INFO","offset":36},{"content":"[00:47:43] [main/INFO]: [注册] WebAPI - Metrics","level":"INFO","offset":37},{"content":"[00:47:43] [main/INFO]: [注册] WebAPI - PBH Ban API","level":"INFO","offset":38},{"content":"[00:47:43] [main/INFO]: [注册] WebAPI - Metadata","level":"INFO","offset":39},{"content":"[00:47:43] [main/INFO]: [注册] WebAPI - Downloader API","level":"INFO","offset":40},{"content":"[00:47:43] [main/INFO]: [注册] WebAPI - Rule Subscription","level":"INFO","offset":41},{"content":"[00:47:43] [main/INFO]: [注册] WebAPI - Authenticate","level":"INFO","offset":42},{"content":"[00:47:43] [main/INFO]: [注册] Active Monitoring","level":"INFO","offset":43},{"content":"[00:47:43] [virtual-62/INFO]: [数据清理] ActiveMonitoring 正在清理过期数据,这可能需要一点时间……","level":"INFO","offset":44},{"content":"[00:47:43] [main/INFO]: [注册] WebAPI - PBH Plus Interface","level":"INFO","offset":45},{"content":"[00:47:43] [main/INFO]: [注册] WebAPI - OOBE Interface","level":"INFO","offset":46},{"content":"[00:47:43] [virtual-62/INFO]: [数据清理] ActiveMonitoring 已删除了 0 条过期数据","level":"INFO","offset":47},{"content":"[00:47:43] [main/INFO]: [注册] WebAPI - Charts","level":"INFO","offset":48},{"content":"[00:47:43] [main/INFO]: [注册] WebAPI - General","level":"INFO","offset":49},{"content":"[00:47:43] [main/INFO]: [注册] Torrent Controller","level":"INFO","offset":50},{"content":"[00:47:43] [main/INFO]: [注册] Peer Controller","level":"INFO","offset":51},{"content":"[00:47:43] [main/INFO]: [注册] WebAPI - Alerts","level":"INFO","offset":52},{"content":"[00:47:43] [main/INFO]: [注册] WebAPI - Logs","level":"INFO","offset":53},{"content":"[00:47:44] [main/INFO]: Starting Javalin ...","level":"INFO","offset":54},{"content":"[00:47:44] [main/INFO]: jetty-11.0.23; built: 2024-08-14T01:40:17.906Z; git: 6fcf5ccaebd7ca13a0cb96c96adca699a24080a0; jvm 21.0.4+7-LTS","level":"INFO","offset":55},{"content":"[00:47:44] [main/INFO]: Session workerName=node0","level":"INFO","offset":56},{"content":"[00:47:44] [main/INFO]: Started o.e.j.s.ServletContextHandler@2f3a8166{/,null,AVAILABLE}","level":"INFO","offset":57},{"content":"[00:47:44] [main/INFO]: Started ServerConnector@dbda472{HTTP/1.1, (http/1.1)}{0.0.0.0:9898}","level":"INFO","offset":58},{"content":"[00:47:44] [main/INFO]: Started Server@6aae82cc{STARTING}[11.0.23,sto=0] @9401ms","level":"INFO","offset":59},{"content":"[00:47:44] [main/INFO]: Javalin started in 598ms \\o/","level":"INFO","offset":60},{"content":"[00:47:44] [main/INFO]: Static file handler added: StaticFileConfig(hostedPath=/, directory=/static, location=CLASSPATH, precompress=false, aliasCheck=null, headers={Cache-Control=max-age=0}, skipFileFunction=com.ghostchu.peerbanhelper.web.JavalinWebContainer$$Lambda/0x000002a2bd499320@637506d8, mimeTypes={}). File system location: 'file:///F:/IdeaProjects/PeerBanHelper/target/classes/static/'","level":"INFO","offset":61},{"content":"[00:47:44] [main/INFO]: Listening on http://localhost:9898/","level":"INFO","offset":62},{"content":"[00:47:44] [main/INFO]: You are running Javalin 6.3.0 (released August 22, 2024).","level":"INFO","offset":63},{"content":"[00:47:44] [main/INFO]: [封禁] 已从保存的封禁列表缓存文件中恢复了 5234 个封禁项","level":"INFO","offset":64},{"content":"[00:47:45] [main/INFO]: PeerBanHelper BanWave Daemon 已启动","level":"INFO","offset":65},{"content":"[00:47:45] [virtual-125/ERROR]: 登录到 bitcomet (http://127.0.0.1:10047) 失败:无法连接到下载器,登录时出现网络错误:java.net.ConnectException: null","level":"ERROR","offset":66},{"content":"[00:47:45] [Ban Wave/INFO]: 已检查 2 个下载器的 1 个活跃 Torrent 与 5 个 Peers。共封禁 0 个 Peers,并解除 0 个过期的封禁 (449ms)","level":"INFO","offset":67},{"content":"[00:47:50] [virtual-172/ERROR]: 登录到 bitcomet (http://127.0.0.1:10047) 失败:无法连接到下载器,登录时出现网络错误:java.net.ConnectException: null","level":"ERROR","offset":68},{"content":"[00:47:50] [Ban Wave/INFO]: 已检查 2 个下载器的 1 个活跃 Torrent 与 5 个 Peers。共封禁 0 个 Peers,并解除 0 个过期的封禁 (62ms)","level":"INFO","offset":69},{"content":"[00:47:55] [virtual-70/INFO]: [保存] 已成功保存 5234 条封禁数据到数据库","level":"INFO","offset":70},{"content":"[00:47:55] [virtual-211/ERROR]: 登录到 bitcomet (http://127.0.0.1:10047) 失败:无法连接到下载器,登录时出现网络错误:java.net.ConnectException: null","level":"ERROR","offset":71},{"content":"[00:47:55] [Ban Wave/INFO]: 已检查 2 个下载器的 1 个活跃 Torrent 与 4 个 Peers。共封禁 0 个 Peers,并解除 0 个过期的封禁 (109ms)","level":"INFO","offset":72}]}
🟠403未登录或Token错误
🟠429IP地址因频繁失败尝试而被封禁
🔴500内部服务器错误