Skip to content

Commit

Permalink
chore: use warningLog
Browse files Browse the repository at this point in the history
  • Loading branch information
erossignon committed Jul 15, 2023
1 parent 72dfbf8 commit 3086de3
Showing 1 changed file with 4 additions and 3 deletions.
Expand Up @@ -4,7 +4,7 @@
import { assert } from "node-opcua-assert";

import { BrowseDirection, NodeClass } from "node-opcua-data-model";
import { checkDebugFlag, make_debugLog, make_errorLog } from "node-opcua-debug";
import { checkDebugFlag, make_debugLog, make_errorLog, make_warningLog } from "node-opcua-debug";
import { NodeId } from "node-opcua-nodeid";
import { Variant } from "node-opcua-variant";
import { DataType } from "node-opcua-variant";
Expand All @@ -13,11 +13,12 @@ import { VariantArrayType } from "node-opcua-variant";
import { ExtensionObject } from "node-opcua-extension-object";
import { UADataType, UADynamicVariableArray, UAObject, UAReferenceType, UAVariable } from "node-opcua-address-space-base";
import { UAVariableImpl } from "./ua_variable_impl";
import { getProxyTarget } from "./ua_variable_impl_ext_obj";

const doDebug = checkDebugFlag(__filename);
const debugLog = make_debugLog(__filename);
const errorLog = make_errorLog(__filename);
const warningLog= make_warningLog(__filename);

/*
* define a complex Variable containing a array of extension objects
* each element of the array is also accessible as a component variable.
Expand Down Expand Up @@ -129,7 +130,7 @@ function _getElementBrowseName<T extends ExtensionObject>
const indexPropertyName1 = this.$$indexPropertyName;

if (!Object.prototype.hasOwnProperty.call(extObj, indexPropertyName1)) {
console.log(" extension object do not have ", indexPropertyName1, extObj);
warningLog(" extension object does not have ", indexPropertyName1, extObj);
}
// assert(extObj.constructor === addressSpace.constructExtensionObject(dataType));
assert(Object.prototype.hasOwnProperty.call(extObj, indexPropertyName1));
Expand Down

0 comments on commit 3086de3

Please sign in to comment.