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 /client/src/main.ts | |
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 'client/src/main.ts')
-rw-r--r-- | client/src/main.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/client/src/main.ts b/client/src/main.ts index 84c82203d..432db0eac 100644 --- a/client/src/main.ts +++ b/client/src/main.ts | |||
@@ -3,11 +3,14 @@ import { enableDebugTools } from '@angular/platform-browser' | |||
3 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic' | 3 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic' |
4 | import { AppModule } from './app/app.module' | 4 | import { AppModule } from './app/app.module' |
5 | import { environment } from './environments/environment' | 5 | import { environment } from './environments/environment' |
6 | import { logger } from './root-helpers' | ||
6 | 7 | ||
7 | if (environment.production) { | 8 | if (environment.production) { |
8 | enableProdMode() | 9 | enableProdMode() |
9 | } | 10 | } |
10 | 11 | ||
12 | logger.registerServerSending(environment.apiUrl) | ||
13 | |||
11 | const bootstrap = () => platformBrowserDynamic() | 14 | const bootstrap = () => platformBrowserDynamic() |
12 | .bootstrapModule(AppModule) | 15 | .bootstrapModule(AppModule) |
13 | .then(bootstrapModule => { | 16 | .then(bootstrapModule => { |
@@ -22,7 +25,7 @@ const bootstrap = () => platformBrowserDynamic() | |||
22 | return bootstrapModule | 25 | return bootstrapModule |
23 | }) | 26 | }) |
24 | .catch(err => { | 27 | .catch(err => { |
25 | console.error(err) | 28 | logger.error(err) |
26 | return null | 29 | return null |
27 | }) | 30 | }) |
28 | 31 | ||