diff options
author | Chocobozzz <me@florianbigard.com> | 2021-10-20 14:23:32 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-10-20 14:33:38 +0200 |
commit | 64553e8809271df1113e9143426a27f234410a74 (patch) | |
tree | beba7a8d4016b74dd3b85e8081482a3ea6d00eaf /shared/extra-utils/logs | |
parent | 1243729899082a71b3a3efb759df1478d9ea5c83 (diff) | |
download | PeerTube-64553e8809271df1113e9143426a27f234410a74.tar.gz PeerTube-64553e8809271df1113e9143426a27f234410a74.tar.zst PeerTube-64553e8809271df1113e9143426a27f234410a74.zip |
Add ability to filter logs by tags
Diffstat (limited to 'shared/extra-utils/logs')
-rw-r--r-- | shared/extra-utils/logs/logs-command.ts | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/shared/extra-utils/logs/logs-command.ts b/shared/extra-utils/logs/logs-command.ts index 5912e814f..7b5c66c0c 100644 --- a/shared/extra-utils/logs/logs-command.ts +++ b/shared/extra-utils/logs/logs-command.ts | |||
@@ -8,15 +8,16 @@ export class LogsCommand extends AbstractCommand { | |||
8 | startDate: Date | 8 | startDate: Date |
9 | endDate?: Date | 9 | endDate?: Date |
10 | level?: LogLevel | 10 | level?: LogLevel |
11 | tagsOneOf?: string[] | ||
11 | }) { | 12 | }) { |
12 | const { startDate, endDate, level } = options | 13 | const { startDate, endDate, tagsOneOf, level } = options |
13 | const path = '/api/v1/server/logs' | 14 | const path = '/api/v1/server/logs' |
14 | 15 | ||
15 | return this.getRequestBody({ | 16 | return this.getRequestBody<any[]>({ |
16 | ...options, | 17 | ...options, |
17 | 18 | ||
18 | path, | 19 | path, |
19 | query: { startDate, endDate, level }, | 20 | query: { startDate, endDate, level, tagsOneOf }, |
20 | implicitToken: true, | 21 | implicitToken: true, |
21 | defaultExpectedStatus: HttpStatusCode.OK_200 | 22 | defaultExpectedStatus: HttpStatusCode.OK_200 |
22 | }) | 23 | }) |