Skip to content

Commit

Permalink
Removed some unnecessary calls to kjTreeLog
Browse files Browse the repository at this point in the history
  • Loading branch information
kzangeli committed Aug 25, 2023
1 parent 2956d4d commit 746e13b
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 16 deletions.
1 change: 0 additions & 1 deletion src/lib/orionld/common/orionldPatchApply.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
7 changes: 0 additions & 7 deletions src/lib/orionld/common/subCacheApiSubscriptionInsert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions src/lib/orionld/notifications/orionldAlterationsTreat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ static NotificationPending* notificationLookupByCurlHandle(NotificationPending*
//
void orionldAlterationsTreat(OrionldAlteration* altList)
{
#if 1
#if 0
// <DEBUG>
int alterations = 0;
for (OrionldAlteration* aP = altList; aP != NULL; aP = aP->next)
Expand All @@ -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));
Expand Down
4 changes: 1 addition & 3 deletions src/lib/orionld/regCache/regCacheCreate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);

Expand Down
2 changes: 0 additions & 2 deletions src/lib/orionld/serviceRoutines/orionldPatchEntity2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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))
{
Expand Down
1 change: 0 additions & 1 deletion src/lib/orionld/serviceRoutines/orionldPutAttribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 746e13b

Please sign in to comment.