From 746e13b343987d846b3451fe1f943600c4b2abe9 Mon Sep 17 00:00:00 2001 From: Ken Zangelin Date: Fri, 25 Aug 2023 18:19:21 +0200 Subject: [PATCH] Removed some unnecessary calls to kjTreeLog --- src/lib/orionld/common/orionldPatchApply.cpp | 1 - src/lib/orionld/common/subCacheApiSubscriptionInsert.cpp | 7 ------- src/lib/orionld/notifications/orionldAlterationsTreat.cpp | 4 ++-- src/lib/orionld/regCache/regCacheCreate.cpp | 4 +--- src/lib/orionld/serviceRoutines/orionldPatchEntity2.cpp | 2 -- src/lib/orionld/serviceRoutines/orionldPutAttribute.cpp | 1 - 6 files changed, 3 insertions(+), 16 deletions(-) diff --git a/src/lib/orionld/common/orionldPatchApply.cpp b/src/lib/orionld/common/orionldPatchApply.cpp index f32a577a16..e1b94de939 100644 --- a/src/lib/orionld/common/orionldPatchApply.cpp +++ b/src/lib/orionld/common/orionldPatchApply.cpp @@ -208,7 +208,6 @@ void orionldPatchApply(KjNode* patchBase, KjNode* patchP, bool api) if (pathNode->type != KjString) return; LM_T(LmtPatchEntity, ("Applying patch for '%s'", pathNode->value.s)); - // kjTreeLog(patchBase, "patchBase", LmtPatchEntity); char* compV[7]; bool skip = false; diff --git a/src/lib/orionld/common/subCacheApiSubscriptionInsert.cpp b/src/lib/orionld/common/subCacheApiSubscriptionInsert.cpp index bac131b512..23d791deff 100644 --- a/src/lib/orionld/common/subCacheApiSubscriptionInsert.cpp +++ b/src/lib/orionld/common/subCacheApiSubscriptionInsert.cpp @@ -70,8 +70,6 @@ static void subCacheItemFill RenderFormat renderFormat ) { - kjTreeLog(apiSubscriptionP, "apiSubscriptionP", LmtSR); - cSubP->tenant = (tenant == NULL || *tenant == 0)? NULL : strdup(tenant); cSubP->servicePath = strdup("/#"); cSubP->qP = qTree; @@ -434,8 +432,6 @@ static CachedSubscription* subCacheApiSubscriptionUpdate { LM_T(LmtSubCacheSync, ("Updating Cached Subscription (%p) from DB", cSubP)); - kjTreeLog(apiSubscriptionP, "apiSubscription", LmtSubCacheSync); - KjNode* modifiedAtNode = kjLookup(apiSubscriptionP, "modifiedAt"); if (modifiedAtNode == NULL) { @@ -490,10 +486,7 @@ CachedSubscription* subCacheApiSubscriptionInsert subIdNodeP = kjLookup(apiSubscriptionP, "_id"); // FIXME: always "id" !!! if (subIdNodeP == NULL) - { - kjTreeLog(apiSubscriptionP, "apiSubscriptionP", LmtSubCacheSync); LM_X(1, ("Subscription without id - exiting due to bug")); - } char* subId = subIdNodeP->value.s; CachedSubscription* subP = subCacheItemLookup(tenant, subId); diff --git a/src/lib/orionld/notifications/orionldAlterationsTreat.cpp b/src/lib/orionld/notifications/orionldAlterationsTreat.cpp index 82d8027bc1..6a981f6171 100644 --- a/src/lib/orionld/notifications/orionldAlterationsTreat.cpp +++ b/src/lib/orionld/notifications/orionldAlterationsTreat.cpp @@ -466,7 +466,7 @@ static NotificationPending* notificationLookupByCurlHandle(NotificationPending* // void orionldAlterationsTreat(OrionldAlteration* altList) { -#if 1 +#if 0 // int alterations = 0; for (OrionldAlteration* aP = altList; aP != NULL; aP = aP->next) @@ -484,7 +484,7 @@ void orionldAlterationsTreat(OrionldAlteration* altList) LM_T(LmtAlt, (" Alteration Type: %s", orionldAlterationType(aP->alteredAttributeV[ix].alterationType))); } - kjTreeLog(aP->inEntityP, "ALT: inEntityP", LmtAlt); // outdeffed + kjTreeLog(aP->inEntityP, "ALT: inEntityP", LmtAlt); ++alterations; } LM_T(LmtAlt, (" %d Alterations present", alterations)); diff --git a/src/lib/orionld/regCache/regCacheCreate.cpp b/src/lib/orionld/regCache/regCacheCreate.cpp index a17090bf0b..6a9fece2ef 100644 --- a/src/lib/orionld/regCache/regCacheCreate.cpp +++ b/src/lib/orionld/regCache/regCacheCreate.cpp @@ -30,7 +30,7 @@ extern "C" #include "logMsg/logMsg.h" // LM_* -#include "orionld/common/orionldState.h" // orionldState, kjTreeLog +#include "orionld/common/orionldState.h" // orionldState #include "orionld/types/OrionldTenant.h" // OrionldTenant #include "orionld/mongoc/mongocRegistrationsIter.h" // mongocRegistrationsIter #include "orionld/dbModel/dbModelToApiRegistration.h" // dbModelToApiRegistration @@ -72,8 +72,6 @@ int regIterFunc(RegCache* rcP, KjNode* dbRegP) // Convert API Reg to Cache Reg apiModelToCacheRegistration(apiRegP); - // kjTreeLog(apiRegP, "Cache Reg", LmtRegCache); - // Insert cacheRegP in tenantP->regCache (rcP) regCacheItemAdd(rcP, regId, apiRegP, true, fwdContextP); diff --git a/src/lib/orionld/serviceRoutines/orionldPatchEntity2.cpp b/src/lib/orionld/serviceRoutines/orionldPatchEntity2.cpp index d60865e8fe..03bede5b1f 100644 --- a/src/lib/orionld/serviceRoutines/orionldPatchEntity2.cpp +++ b/src/lib/orionld/serviceRoutines/orionldPatchEntity2.cpp @@ -520,9 +520,7 @@ bool apiEntitySimplifiedToNormalized(KjNode* apiEntityFragmentP, KjNode* dbAttrs } } - kjTreeLog(attrP, "Attribute BEFORE attributeTransform", LmtSR); attributeTransform(attrP, attrTypeFromDb, dbAttrTypeP->value.s, orionldState.uriParams.lang); - kjTreeLog(attrP, "Attribute AFTER attributeTransform", LmtSR); } else if ((attrTypeFromDb == Property) && (attrP->type == KjObject)) { diff --git a/src/lib/orionld/serviceRoutines/orionldPutAttribute.cpp b/src/lib/orionld/serviceRoutines/orionldPutAttribute.cpp index 46c1197ada..f12573aa68 100644 --- a/src/lib/orionld/serviceRoutines/orionldPutAttribute.cpp +++ b/src/lib/orionld/serviceRoutines/orionldPutAttribute.cpp @@ -204,7 +204,6 @@ bool orionldPutAttribute(void) // Set creDate (mongocAttributeReplace sets modDate) dbModelAttributeCreatedAtSet(orionldState.requestTree, createdAt); - kjTreeLog(orionldState.requestTree, "orionldState.requestTree", LmtSR); // Write to mongo if (mongocAttributeReplace(entityId, orionldState.requestTree, &detail) == false)