VOL-1247 : Modified change tuple to include previous and latest data

VOL-1214 : Fixed logs to use the proper mechanism

- Added missing license
- Moved one change tuple statement which would not include proper info

Change-Id: I5a02f6fe92c8b193642294d62f4413ac6edc0c62
diff --git a/db/model/child_type.go b/db/model/child_type.go
index de2fad7..d503b8d 100644
--- a/db/model/child_type.go
+++ b/db/model/child_type.go
@@ -16,10 +16,10 @@
 package model
 
 import (
-	"fmt"
 	desc "github.com/golang/protobuf/descriptor"
 	"github.com/golang/protobuf/proto"
 	"github.com/golang/protobuf/protoc-gen-go/descriptor"
+	"github.com/opencord/voltha-go/common/log"
 	"github.com/opencord/voltha-go/protos/common"
 	"reflect"
 	"strconv"
@@ -77,7 +77,7 @@
 					var keyFromStr func(string) interface{}
 
 					if meta.(*common.ChildNode).GetKey() == "" {
-						//fmt.Println("Child key is empty ... moving on")
+						//log.Debugf("Child key is empty ... moving on")
 					} else {
 						parentType := FindOwnerType(reflect.ValueOf(cls), field.GetName(), 0, false)
 						keyType := FindKeyOwner(reflect.New(parentType).Elem().Interface(), meta.(*common.ChildNode).GetKey(), 0)
@@ -108,7 +108,7 @@
 								return uint64(i)
 							}
 						default:
-							fmt.Errorf("Key type not implemented - type: %s\n", keyType.(reflect.Type))
+							log.Errorf("Key type not implemented - type: %s\n", keyType.(reflect.Type))
 						}
 
 						ct := ChildType{