aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/models
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2022-07-15 15:30:14 +0200
committerChocobozzz <me@florianbigard.com>2022-07-18 11:37:18 +0200
commit42b40636991b97fe818007fab19091764fc5db73 (patch)
treedb431787c06ce898d22e91ff771f795219274fc6 /shared/models
parent654d4ede7fa4d0faa71e49bcfab6b65a686397b2 (diff)
downloadPeerTube-42b40636991b97fe818007fab19091764fc5db73.tar.gz
PeerTube-42b40636991b97fe818007fab19091764fc5db73.tar.zst
PeerTube-42b40636991b97fe818007fab19091764fc5db73.zip
Add ability for client to create server logs
Diffstat (limited to 'shared/models')
-rw-r--r--shared/models/server/client-log-create.model.ts11
-rw-r--r--shared/models/server/client-log-level.type.ts1
-rw-r--r--shared/models/server/index.ts4
-rw-r--r--shared/models/server/log-level.type.ts1
-rw-r--r--shared/models/server/server-log-level.type.ts1
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 @@
1import { ClientLogLevel } from './client-log-level.type'
2
3export 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 @@
1export * from './about.model' 1export * from './about.model'
2export * from './broadcast-message-level.type' 2export * from './broadcast-message-level.type'
3export * from './client-log-create.model'
4export * from './client-log-level.type'
3export * from './contact-form.model' 5export * from './contact-form.model'
4export * from './custom-config.model' 6export * from './custom-config.model'
5export * from './debug.model' 7export * from './debug.model'
6export * from './emailer.model' 8export * from './emailer.model'
7export * from './job.model' 9export * from './job.model'
8export * from './log-level.type'
9export * from './peertube-problem-document.model' 10export * from './peertube-problem-document.model'
10export * from './server-config.model' 11export * from './server-config.model'
11export * from './server-debug.model' 12export * from './server-debug.model'
12export * from './server-error-code.enum' 13export * from './server-error-code.enum'
13export * from './server-follow-create.model' 14export * from './server-follow-create.model'
15export * from './server-log-level.type'
14export * from './server-stats.model' 16export * 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 @@
1export 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'