@@ -2,6 +2,7 @@ import type { NotifiedEvent, SubEvent, YoutubeClient } from "../core/YoutubeClie
22import { baseEvent } from "../core/baseEvent" ;
33import { youtube } from "../config.json" ;
44import { sendLog } from "../utils/eventLogger" ;
5+ import { logger } from "@sentry/node-core" ;
56
67
78export class YoutubeEvents extends baseEvent {
@@ -31,14 +32,16 @@ export class YoutubeEvents extends baseEvent {
3132 return ;
3233
3334 await this . client . service . redis . set ( `youtube:${ data . video . id } ` , "true" , "EX" , 43200 ) ;
34- console . log ( `Video (${ data . video . id } ) was notified with Publish: ${ data . published } and Updated: ${ data . updated } ` ) ;
35+ logger . info ( `Published Youtube Video ID: ${ data . video . id } ` , {
36+ publishTime : data . published ,
37+ updateTime : data . updated
38+ } ) ;
3539
3640 const rolePing = this . config . pingRoleID !== "0" ? `<@&${ this . config . pingRoleID } >` : "" ;
3741 this . client . alertChannel ?. send ( { content : `${ rolePing } New Video is out!! Check it out here: ${ data . video . link } ` } ) ;
3842 }
3943
4044 private async subscribe ( data : SubEvent ) {
41- console . log ( "Youtube Notification Service: PubSubHubbub has been Subscribed..." ) ;
4245 await sendLog ( {
4346 type : "Info" ,
4447 message : "Youtube Notification Service: PubSubHubbub has been Subscribed..."
@@ -56,7 +59,6 @@ export class YoutubeEvents extends baseEvent {
5659 }
5760
5861 private async unsubscribe ( ) {
59- console . log ( "Youtube Notification Service: Even has been unsubscribed, resubscribing..." ) ;
6062 await sendLog ( {
6163 type : "Warning" ,
6264 message : "Youtube Notification Service: Even has been unsubscribed, resubscribing..."
0 commit comments