diff options
author | Chocobozzz <me@florianbigard.com> | 2022-07-15 15:30:14 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-07-18 11:37:18 +0200 |
commit | 42b40636991b97fe818007fab19091764fc5db73 (patch) | |
tree | db431787c06ce898d22e91ff771f795219274fc6 /shared/models/server | |
parent | 654d4ede7fa4d0faa71e49bcfab6b65a686397b2 (diff) | |
download | PeerTube-42b40636991b97fe818007fab19091764fc5db73.tar.gz PeerTube-42b40636991b97fe818007fab19091764fc5db73.tar.zst PeerTube-42b40636991b97fe818007fab19091764fc5db73.zip |
Add ability for client to create server logs
Diffstat (limited to 'shared/models/server')
-rw-r--r-- | shared/models/server/client-log-create.model.ts | 11 | ||||
-rw-r--r-- | shared/models/server/client-log-level.type.ts | 1 | ||||
-rw-r--r-- | shared/models/server/index.ts | 4 | ||||
-rw-r--r-- | shared/models/server/log-level.type.ts | 1 | ||||
-rw-r--r-- | shared/models/server/server-log-level.type.ts | 1 |
5 files changed, 16 insertions, 2 deletions
diff --git a/shared/models/server/client-log-create.model.ts b/shared/models/server/client-log-create.model.ts new file mode 100644 index 000000000..c9dc65568 --- /dev/null +++ b/shared/models/server/client-log-create.model.ts | |||
@@ -0,0 +1,11 @@ | |||
1 | import { ClientLogLevel } from './client-log-level.type' | ||
2 | |||
3 | export interface ClientLogCreate { | ||
4 | message: string | ||
5 | url: string | ||
6 | level: ClientLogLevel | ||
7 | |||
8 | stackTrace?: string | ||
9 | userAgent?: string | ||
10 | meta?: string | ||
11 | } | ||
diff --git a/shared/models/server/client-log-level.type.ts b/shared/models/server/client-log-level.type.ts new file mode 100644 index 000000000..18dea2751 --- /dev/null +++ b/shared/models/server/client-log-level.type.ts | |||
@@ -0,0 +1 @@ | |||
export type ClientLogLevel = 'warn' | 'error' | |||
diff --git a/shared/models/server/index.ts b/shared/models/server/index.ts index 0f7646c7a..a9136f3d4 100644 --- a/shared/models/server/index.ts +++ b/shared/models/server/index.ts | |||
@@ -1,14 +1,16 @@ | |||
1 | export * from './about.model' | 1 | export * from './about.model' |
2 | export * from './broadcast-message-level.type' | 2 | export * from './broadcast-message-level.type' |
3 | export * from './client-log-create.model' | ||
4 | export * from './client-log-level.type' | ||
3 | export * from './contact-form.model' | 5 | export * from './contact-form.model' |
4 | export * from './custom-config.model' | 6 | export * from './custom-config.model' |
5 | export * from './debug.model' | 7 | export * from './debug.model' |
6 | export * from './emailer.model' | 8 | export * from './emailer.model' |
7 | export * from './job.model' | 9 | export * from './job.model' |
8 | export * from './log-level.type' | ||
9 | export * from './peertube-problem-document.model' | 10 | export * from './peertube-problem-document.model' |
10 | export * from './server-config.model' | 11 | export * from './server-config.model' |
11 | export * from './server-debug.model' | 12 | export * from './server-debug.model' |
12 | export * from './server-error-code.enum' | 13 | export * from './server-error-code.enum' |
13 | export * from './server-follow-create.model' | 14 | export * from './server-follow-create.model' |
15 | export * from './server-log-level.type' | ||
14 | export * from './server-stats.model' | 16 | export * from './server-stats.model' |
diff --git a/shared/models/server/log-level.type.ts b/shared/models/server/log-level.type.ts deleted file mode 100644 index 4afb92d11..000000000 --- a/shared/models/server/log-level.type.ts +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | export type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'audit' | ||
diff --git a/shared/models/server/server-log-level.type.ts b/shared/models/server/server-log-level.type.ts new file mode 100644 index 000000000..f0f31a4ae --- /dev/null +++ b/shared/models/server/server-log-level.type.ts | |||
@@ -0,0 +1 @@ | |||
export type ServerLogLevel = 'debug' | 'info' | 'warn' | 'error' | 'audit' | |||