From 42b40636991b97fe818007fab19091764fc5db73 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 15 Jul 2022 15:30:14 +0200 Subject: Add ability for client to create server logs --- .../shared-video-playlist/video-add-to-playlist.component.ts | 10 +++++----- .../app/shared/shared-video-playlist/video-playlist.service.ts | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'client/src/app/shared/shared-video-playlist') diff --git a/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.ts b/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.ts index e4972ec10..e019fdd26 100644 --- a/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.ts +++ b/client/src/app/shared/shared-video-playlist/video-add-to-playlist.component.ts @@ -16,7 +16,7 @@ import { import { VIDEO_PLAYLIST_DISPLAY_NAME_VALIDATOR } from '../form-validators/video-playlist-validators' import { CachedPlaylist, VideoPlaylistService } from './video-playlist.service' -const logger = debug('peertube:playlists:VideoAddToPlaylistComponent') +const debugLogger = debug('peertube:playlists:VideoAddToPlaylistComponent') type PlaylistElement = { enabled: boolean @@ -110,7 +110,7 @@ export class VideoAddToPlaylistComponent extends FormReactive implements OnInit, } reload () { - logger('Reloading component') + debugLogger('Reloading component') this.videoPlaylists = [] this.videoPlaylistSearch = undefined @@ -121,7 +121,7 @@ export class VideoAddToPlaylistComponent extends FormReactive implements OnInit, } load () { - logger('Loading component') + debugLogger('Loading component') this.listenToVideoPlaylistChange() @@ -331,7 +331,7 @@ export class VideoAddToPlaylistComponent extends FormReactive implements OnInit, } private rebuildPlaylists (existResult: VideoExistInPlaylist[]) { - logger('Got existing results for %d.', this.video.id, existResult) + debugLogger('Got existing results for %d.', this.video.id, existResult) const oldPlaylists = this.videoPlaylists @@ -359,7 +359,7 @@ export class VideoAddToPlaylistComponent extends FormReactive implements OnInit, this.videoPlaylists.push(playlistSummary) } - logger('Rebuilt playlist state for video %d.', this.video.id, this.videoPlaylists) + debugLogger('Rebuilt playlist state for video %d.', this.video.id, this.videoPlaylists) this.cd.markForCheck() } diff --git a/client/src/app/shared/shared-video-playlist/video-playlist.service.ts b/client/src/app/shared/shared-video-playlist/video-playlist.service.ts index db9f78a7a..81ae0f292 100644 --- a/client/src/app/shared/shared-video-playlist/video-playlist.service.ts +++ b/client/src/app/shared/shared-video-playlist/video-playlist.service.ts @@ -23,7 +23,7 @@ import { environment } from '../../../environments/environment' import { VideoPlaylistElement } from './video-playlist-element.model' import { VideoPlaylist } from './video-playlist.model' -const logger = debug('peertube:playlists:VideoPlaylistService') +const debugLogger = debug('peertube:playlists:VideoPlaylistService') export type CachedPlaylist = VideoPlaylist | { id: number, displayName: string } @@ -287,15 +287,15 @@ export class VideoPlaylistService { } runPlaylistCheck (videoId: number) { - logger('Running playlist check.') + debugLogger('Running playlist check.') if (this.videoExistsCache[videoId]) { - logger('Found cache for %d.', videoId) + debugLogger('Found cache for %d.', videoId) return this.videoExistsInPlaylistCacheSubject.next({ [videoId]: this.videoExistsCache[videoId] }) } - logger('Fetching from network for %d.', videoId) + debugLogger('Fetching from network for %d.', videoId) return this.videoExistsInPlaylistNotifier.next(videoId) } -- cgit v1.2.3