Skip to content

Commit

Permalink
chore: turn warning to debug message
Browse files Browse the repository at this point in the history
  • Loading branch information
erossignon committed Jul 14, 2023
1 parent 2e9e962 commit 53c90b3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/node-opcua-service-filter/source/resolve_operand.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NodeClass } from "node-opcua-data-model";
import { make_warningLog } from "node-opcua-debug";
import { checkDebugFlag, make_debugLog, make_warningLog } from "node-opcua-debug";
import { NodeId } from "node-opcua-nodeid";
import { constructBrowsePathFromQualifiedName, makeBrowsePath } from "node-opcua-service-translate-browse-path";
import { StatusCodes } from "node-opcua-status-code";
Expand All @@ -8,6 +8,8 @@ import { DataType, Variant } from "node-opcua-variant";
import { FilterContext } from "./filter_context";

const warningLog = make_warningLog("FILTER");
const debugLog = make_debugLog("FILTER");
const doDebug = checkDebugFlag("FILTER");

// export function readOperand(context: FilterContext, operand: SimpleAttributeOperand): Variant {
// // navigate to the innerNode specified by the browsePath [ QualifiedName]
Expand All @@ -30,7 +32,7 @@ export function resolveOperand(context: FilterContext, operand: SimpleAttributeO
}
const nodeClass = context.getNodeClass(target);
if (nodeClass !== NodeClass.Variable) {
warningLog("resolveOperand: cannot find variable here but got nodeClass", NodeClass[nodeClass], browsePath.toString());
doDebug && debugLog("resolveOperand: cannot find variable here but got nodeClass", NodeClass[nodeClass], browsePath.toString());
return new Variant({ dataType: DataType.StatusCode, value: StatusCodes.BadNodeClassInvalid });
}
const value = context.readNodeValue(target);
Expand Down

0 comments on commit 53c90b3

Please sign in to comment.