Log messages added in File converter 20/14420/1
authoraravind.est <aravindhan.a@est.tech>
Thu, 15 May 2025 16:59:15 +0000 (17:59 +0100)
committeraravind.est <aravindhan.a@est.tech>
Thu, 15 May 2025 17:00:49 +0000 (18:00 +0100)
Current log messages fails to show up in the console.

Issue-ID: NONRTRIC-1020
Change-Id: I056ac1d7d091420a1ba70531a3585855fd15cb9e
Signed-off-by: aravind.est <aravindhan.a@est.tech>
pm-file-converter/components/xmltransform/xmltransform.go

index 046882a..458d355 100644 (file)
@@ -52,6 +52,7 @@ func xmlToJsonConv(fBytevalue *[]byte, xfeh *dataTypes.XmlFileEventHeader) ([]by
        start := time.Now()
        err := xml.Unmarshal(*fBytevalue, &f)
        if err != nil {
+               log.Error("Error unmarshalling xml file: ", err)
                return nil, errors.New("Cannot unmarshal xml-file")
        }
        log.Debug("Unmarshal xml file XmlFileEvent: ", time.Since(start).String())
@@ -144,6 +145,7 @@ func xmlToJsonConv(fBytevalue *[]byte, xfeh *dataTypes.XmlFileEventHeader) ([]by
        log.Debug("Marshal json : ", time.Since(start).String())
 
        if err != nil {
+               log.Error("Cannot marshal converted json ", err)
                return nil, errors.New("Cannot marshal converted json")
        }
        return json, nil