@@ -307,7 +307,6 @@ func resourceSumologicMonitorsLibraryMonitorRead(d *schema.ResourceData, meta in
307307 schemaInternalNotification := make ([]interface {}, 1 )
308308 internalNotification := make (map [string ]interface {})
309309 internalNotificationDict := n .Notification .(map [string ]interface {})
310- log .Printf ("[ROHIT DEBUG] internalNotificationDict before: %v" , internalNotificationDict )
311310 // log.Printf("monitor.Notification %v", n.Notification)
312311 if internalNotificationDict ["connectionType" ] != nil {
313312 internalNotification ["connection_type" ] = internalNotificationDict ["connectionType" ].(string )
@@ -322,7 +321,6 @@ func resourceSumologicMonitorsLibraryMonitorRead(d *schema.ResourceData, meta in
322321 internalNotification ["connection_type" ] = "Webhook"
323322 }
324323 }
325- log .Printf ("[ROHIT DEBUG] internalNotification after fixing: %v" , internalNotification )
326324 if internalNotification ["connection_type" ].(string ) == "Email" {
327325 // for backwards compatibility
328326 internalNotification ["action_type" ] = "EmailAction"
@@ -409,17 +407,13 @@ func getNotifications(d *schema.ResourceData) []MonitorNotification {
409407 notificationActionDict := rawNotificationAction [0 ].(map [string ]interface {})
410408 connectionType := ""
411409 actionType := ""
412- log .Printf ("[ROHIT DEBUG] notificationActionDict: %v" , notificationActionDict )
413410 if notificationActionDict ["connection_type" ] != nil &&
414411 notificationActionDict ["connection_type" ] != "" {
415412 connectionType = notificationActionDict ["connection_type" ].(string )
416413 actionType = connectionType
417- log .Printf ("[ROHIT DEBUG] actionType in if: %v" , actionType )
418- log .Printf ("[ROHIT DEBUG] connectionType in if: %v" , connectionType )
419414 } else {
420415 // for backwards compatibility
421416 actionType = notificationActionDict ["action_type" ].(string )
422- log .Printf ("[ROHIT DEBUG] actionType in else: %v" , actionType )
423417 connectionType = actionType
424418 // convert from old action_type name to new connection_type name if applicable
425419 if connectionType == "EmailAction" {
@@ -428,10 +422,7 @@ func getNotifications(d *schema.ResourceData) []MonitorNotification {
428422 if connectionType == "NamedConnectionAction" {
429423 connectionType = "Webhook"
430424 }
431- log .Printf ("[ROHIT DEBUG] connectionType in else: %v" , connectionType )
432425 }
433- log .Printf ("[ROHIT DEBUG] actionType: %v" , actionType )
434- log .Printf ("[ROHIT DEBUG] connectionType: %v" , connectionType )
435426 if connectionType == "Email" {
436427 notificationAction := EmailNotification {}
437428 actionType = "EmailAction"
@@ -452,7 +443,6 @@ func getNotifications(d *schema.ResourceData) []MonitorNotification {
452443 n .Notification = notificationAction
453444 }
454445 n .RunForTriggerTypes = notificationDict ["run_for_trigger_types" ].([]interface {})
455- log .Printf ("[ROHIT DEBUG] Notification object: %v" , n .Notification )
456446 notifications [i ] = n
457447 }
458448 return notifications
0 commit comments