File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed
cloud-control-manager/cloud-driver/drivers/ncp Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ import (
2828
2929 // ncpcon "github.com/cloud-barista/ncp/ncp/connect" // For local testing
3030 ncpcon "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/ncp/connect"
31+ ncprs "github.com/cloud-barista/cb-spider/cloud-control-manager/cloud-driver/drivers/ncp/resources"
3132)
3233
3334var cblogger * logrus.Logger
@@ -139,6 +140,9 @@ func (driver *NcpVpcDriver) ConnectCloud(connectionInfo idrv.ConnectionInfo) (ic
139140 // 3. create CloudConnection Instance of "connect/TDA_CloudConnection".
140141 // 4. return CloudConnection Interface of TDA_CloudConnection.
141142
143+ // Initialize Logger
144+ ncprs .InitLog ()
145+
142146 vmClient , err := getVmClient (connectionInfo )
143147 if err != nil {
144148 return nil , err
Original file line number Diff line number Diff line change @@ -85,12 +85,18 @@ func String(n int32) string {
8585}
8686
8787func LoggingError (hiscallInfo call.CLOUDLOGSCHEMA , err error ) {
88+ if cblogger == nil || calllogger == nil {
89+ InitLog ()
90+ }
8891 cblogger .Error (err .Error ())
8992 hiscallInfo .ErrorMSG = err .Error ()
9093 calllogger .Error (call .String (hiscallInfo ))
9194}
9295
9396func LoggingInfo (hiscallInfo call.CLOUDLOGSCHEMA , start time.Time ) {
97+ if calllogger == nil {
98+ InitLog ()
99+ }
94100 hiscallInfo .ElapsedTime = call .Elapsed (start )
95101 calllogger .Info (call .String (hiscallInfo ))
96102}
You can’t perform that action at this time.
0 commit comments