@@ -71,8 +71,8 @@ NAN_METHOD(OZW::UpdateOptions)
71
71
CheckMinArgs (1 , " info" );
72
72
73
73
OZW *self = ObjectWrap::Unwrap<OZW>(info.This ());
74
- ::std::string ozw_userpath;
75
- ::std::string ozw_config_path;
74
+ ::std::string ozw_userpath = self-> userpath ;
75
+ ::std::string ozw_config_path = self-> config_path ;
76
76
77
77
::std::string option_overrides;
78
78
bool log_initialisation = true ;
@@ -90,6 +90,10 @@ NAN_METHOD(OZW::UpdateOptions)
90
90
::std::string keyname = *Nan::Utf8String (key);
91
91
Local<Value> argval = Nan::Get (opts, key).ToLocalChecked ();
92
92
::std::string argvalstr = *Nan::Utf8String (argval);
93
+
94
+ if (argvalstr.empty ())
95
+ continue ;
96
+
93
97
// UserPath is directly passed to Manager->Connect()
94
98
// scan for OpenZWave options.xml in the nodeJS module's '/config' subdirectory
95
99
if (keyname == " UserPath" )
@@ -116,6 +120,26 @@ NAN_METHOD(OZW::UpdateOptions)
116
120
self->userpath = ozw_userpath;
117
121
self->option_overrides = option_overrides;
118
122
self->log_initialisation = log_initialisation;
123
+
124
+ if (self->log_initialisation ) {
125
+ ::std::ostringstream versionstream;
126
+
127
+ versionstream << ozw_vers_major << " ." << ozw_vers_minor << " ." << ozw_vers_revision;
128
+ ::std::cout << " Initialising OpenZWave " << versionstream.str () << " binary addon for Node.JS.\n " ;
129
+
130
+ #if OPENZWAVE_SECURITY == 1
131
+ ::std::cout << " \t OpenZWave Security API is ENABLED\n " ;
132
+ #else
133
+ ::std::cout << " \t Security API not found, using legacy BeginControllerCommand() instead\n " ;
134
+ #endif
135
+
136
+ ::std::cout << " \t ZWave device db : " << ozw_config_path << " \n " ;
137
+ ::std::cout << " \t User settings path : " << ozw_userpath << " \n " ;
138
+ if (option_overrides.length () > 0 ) {
139
+ ::std::cout << " \t Option Overrides :" << option_overrides << " \n " ;
140
+ }
141
+ }
142
+
119
143
}
120
144
121
145
// ===================================================================
0 commit comments