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/app/shared/shared-custom-markup | |
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/app/shared/shared-custom-markup')
-rw-r--r-- | client/src/app/shared/shared-custom-markup/custom-markup.service.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/client/src/app/shared/shared-custom-markup/custom-markup.service.ts b/client/src/app/shared/shared-custom-markup/custom-markup.service.ts index a959b336d..d738a644e 100644 --- a/client/src/app/shared/shared-custom-markup/custom-markup.service.ts +++ b/client/src/app/shared/shared-custom-markup/custom-markup.service.ts | |||
@@ -20,6 +20,7 @@ import { | |||
20 | VideosListMarkupComponent | 20 | VideosListMarkupComponent |
21 | } from './peertube-custom-tags' | 21 | } from './peertube-custom-tags' |
22 | import { CustomMarkupComponent } from './peertube-custom-tags/shared' | 22 | import { CustomMarkupComponent } from './peertube-custom-tags/shared' |
23 | import { logger } from '@root-helpers/logger' | ||
23 | 24 | ||
24 | type AngularBuilderFunction = (el: HTMLElement) => ComponentRef<CustomMarkupComponent> | 25 | type AngularBuilderFunction = (el: HTMLElement) => ComponentRef<CustomMarkupComponent> |
25 | type HTMLBuilderFunction = (el: HTMLElement) => HTMLElement | 26 | type HTMLBuilderFunction = (el: HTMLElement) => HTMLElement |
@@ -70,7 +71,7 @@ export class CustomMarkupService { | |||
70 | // Insert as first child | 71 | // Insert as first child |
71 | e.insertBefore(element, e.firstChild) | 72 | e.insertBefore(element, e.firstChild) |
72 | } catch (err) { | 73 | } catch (err) { |
73 | console.error('Cannot inject component %s.', selector, err) | 74 | logger.error(`Cannot inject component ${selector}`, err) |
74 | } | 75 | } |
75 | }) | 76 | }) |
76 | } | 77 | } |
@@ -90,7 +91,7 @@ export class CustomMarkupService { | |||
90 | 91 | ||
91 | this.dynamicElementService.injectElement(e, component) | 92 | this.dynamicElementService.injectElement(e, component) |
92 | } catch (err) { | 93 | } catch (err) { |
93 | console.error('Cannot inject component %s.', selector, err) | 94 | logger.error(`Cannot inject component ${selector}`, err) |
94 | } | 95 | } |
95 | }) | 96 | }) |
96 | } | 97 | } |