aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-custom-markup
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 /client/src/app/shared/shared-custom-markup
parent654d4ede7fa4d0faa71e49bcfab6b65a686397b2 (diff)
downloadPeerTube-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.ts5
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'
22import { CustomMarkupComponent } from './peertube-custom-tags/shared' 22import { CustomMarkupComponent } from './peertube-custom-tags/shared'
23import { logger } from '@root-helpers/logger'
23 24
24type AngularBuilderFunction = (el: HTMLElement) => ComponentRef<CustomMarkupComponent> 25type AngularBuilderFunction = (el: HTMLElement) => ComponentRef<CustomMarkupComponent>
25type HTMLBuilderFunction = (el: HTMLElement) => HTMLElement 26type 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 }