remove some debug log

This commit is contained in:
Qiu Jian
2018-08-25 13:07:25 +08:00
parent b16613a0e6
commit 4f24cbe615
2 changed files with 5 additions and 5 deletions
+2 -2
View File
@@ -524,7 +524,7 @@ func (dispatcher *DBModelDispatcher) tryGetModelProperty(ctx context.Context, pr
}
func (dispatcher *DBModelDispatcher) Get(ctx context.Context, idStr string, query jsonutils.JSONObject) (jsonutils.JSONObject, error) {
log.Debugf("Get %s", idStr)
// log.Debugf("Get %s", idStr)
userCred := fetchUserCredential(ctx)
data, err := dispatcher.tryGetModelProperty(ctx, idStr, query)
@@ -541,7 +541,7 @@ func (dispatcher *DBModelDispatcher) Get(ctx context.Context, idStr string, quer
} else if err != nil {
return nil, err
}
log.Debugf("Get found %s", model)
// log.Debugf("Get found %s", model)
if !model.AllowGetDetails(ctx, userCred, query) {
return nil, httperrors.NewForbiddenError("Not allow to get details")
}
+3 -3
View File
@@ -161,16 +161,16 @@ func (model *SVirtualResourceBase) AllowPerformMetadata(ctx context.Context, use
}
func (model *SVirtualResourceBase) GetTenantCache(ctx context.Context) (*STenant, error) {
log.Debugf("Get tenant by Id %s", model.ProjectId)
// log.Debugf("Get tenant by Id %s", model.ProjectId)
return TenantCacheManager.FetchTenantById(ctx, model.ProjectId)
}
func (model *SVirtualResourceBase) getMoreDetails(ctx context.Context, userCred mcclient.TokenCredential, query jsonutils.JSONObject, extra *jsonutils.JSONDict) *jsonutils.JSONDict {
if userCred.IsSystemAdmin() {
log.Debugf("GetCustomizeColumns")
// log.Debugf("GetCustomizeColumns")
tobj, err := model.GetTenantCache(ctx)
if err == nil {
log.Debugf("GetTenantFromCache %s", jsonutils.Marshal(tobj))
// log.Debugf("GetTenantFromCache %s", jsonutils.Marshal(tobj))
extra.Add(jsonutils.NewString(tobj.GetName()), "tenant")
} else {
log.Errorf("GetTenantCache fail %s", err)