Skip to content

Commit 8e02fb0

Browse files
sam-githubsjanuary
authored andcommitted
Specify logggingLevel::debug, its not v8::debug (#463)
1 parent 0534291 commit 8e02fb0

File tree

6 files changed

+21
-21
lines changed

6 files changed

+21
-21
lines changed

src/appmetrics.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ static bool loadProperties() {
173173
std::string propFilename(fileJoin(*applicationDir, std::string(PROPERTIES_FILE)));
174174
loaded = loaderApi->loadPropertiesFile(propFilename.c_str());
175175
} else {
176-
loaderApi->logMessage(debug, "Cannot load properties from application directory, main module not defined");
176+
loaderApi->logMessage(loggingLevel::debug, "Cannot load properties from application directory, main module not defined");
177177
}
178178

179179
// Load from current working directory, if possible

src/plugins/node/env/nodeenvplugin.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,15 +276,15 @@ static void GetNodeInformation(uv_async_t *async, int status) {
276276
data.data = content.c_str();
277277
plugin::api.agentPushData(&data);
278278
} else {
279-
plugin::api.logMessage(debug, "[environment_node] Unable to get Node.js environment information");
279+
plugin::api.logMessage(loggingLevel::debug, "[environment_node] Unable to get Node.js environment information");
280280
}
281281

282282
}
283283

284284
extern "C" {
285285
NODEENVPLUGIN_DECL pushsource* ibmras_monitoring_registerPushSource(agentCoreFunctions api, uint32 provID) {
286286
plugin::api = api;
287-
plugin::api.logMessage(debug, "[environment_node] Registering push sources");
287+
plugin::api.logMessage(loggingLevel::debug, "[environment_node] Registering push sources");
288288

289289
pushsource *head = createPushSource(0, "environment_node");
290290
plugin::provid = provID;

src/plugins/node/gc/nodegcplugin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ pushsource* createPushSource(uint32 srcid, const char* name) {
188188
extern "C" {
189189
NODEGCPLUGIN_DECL pushsource* ibmras_monitoring_registerPushSource(agentCoreFunctions api, uint32 provID) {
190190
plugin::api = api;
191-
plugin::api.logMessage(debug, "[gc_node] Registering push sources");
191+
plugin::api.logMessage(loggingLevel::debug, "[gc_node] Registering push sources");
192192

193193
pushsource *head = createPushSource(0, "gc_node");
194194
plugin::provid = provID;

src/plugins/node/heap/nodeheapplugin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ pushsource* createPushSource(uint32 srcid, const char* name) {
100100
extern "C" {
101101
NODEHEAPPLUGIN_DECL pushsource* ibmras_monitoring_registerPushSource(agentCoreFunctions api, uint32 provID) {
102102
plugin::api = api;
103-
plugin::api.logMessage(debug, "[heap_node] Registering push sources");
103+
plugin::api.logMessage(loggingLevel::debug, "[heap_node] Registering push sources");
104104

105105
pushsource *head = createPushSource(0, "heap_node");
106106
plugin::provid = provID;

src/plugins/node/loop/nodeloopplugin.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ void OnCheck(uv_check_t* handle) {
127127
extern "C" {
128128
NODELOOPPLUGIN_DECL pushsource* ibmras_monitoring_registerPushSource(agentCoreFunctions api, uint32 provID) {
129129
plugin::api = api;
130-
plugin::api.logMessage(debug, "[loop_node] Registering push sources");
130+
plugin::api.logMessage(loggingLevel::debug, "[loop_node] Registering push sources");
131131

132132
pushsource *head = createPushSource(0, "loop_node");
133133
plugin::provid = provID;

src/plugins/node/prof/nodeprofplugin.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ static char * ConstructData(const CpuProfile *profile) {
212212
static Isolate* GetIsolate() {
213213
Isolate *isolate = v8::Isolate::GetCurrent();
214214
if (isolate == NULL) {
215-
plugin::api.logMessage(debug, "[profiling_node] No V8 Isolate found");
215+
plugin::api.logMessage(loggingLevel::debug, "[profiling_node] No V8 Isolate found");
216216
}
217217
return isolate;
218218
}
@@ -272,11 +272,11 @@ void collectData() {
272272

273273
delete[] serialisedProfile;
274274
} else {
275-
plugin::api.logMessage(debug,
275+
plugin::api.logMessage(loggingLevel::debug,
276276
"[profiling_node] Failed to serialise method profile"); // CHECK(tunniclm): Should this be a warning?
277277
}
278278
} else {
279-
plugin::api.logMessage(debug,
279+
plugin::api.logMessage(loggingLevel::debug,
280280
"[profiling_node] No method profile found"); // CHECK(tunniclm): Should this be a warning?
281281
}
282282

@@ -321,7 +321,7 @@ static void publishEnabled() {
321321

322322
std::stringstream logMsg;
323323
logMsg << "[profiling_node] Sending config message [" << msg << "]";
324-
plugin::api.logMessage(debug, logMsg.str().c_str());
324+
plugin::api.logMessage(loggingLevel::debug, logMsg.str().c_str());
325325

326326
plugin::api.agentSendMessage(("configuration/" + sourceName).c_str(), msg.length(),
327327
(void*) msg.c_str());
@@ -334,7 +334,7 @@ static void StartProfilerWithoutTiming(uv_async_t *async, int status) {
334334
#endif
335335
if (plugin::enabled) return;
336336
plugin::enabled = true;
337-
plugin::api.logMessage(debug, "[profiling_node] Publishing config");
337+
plugin::api.logMessage(loggingLevel::debug, "[profiling_node] Publishing config");
338338
publishEnabled();
339339
StartTheProfiler();
340340
}
@@ -347,7 +347,7 @@ static void StopProfilerWithoutTiming(uv_async_t *async, int status) {
347347
collectData();
348348
if (!plugin::enabled) return;
349349
plugin::enabled = false;
350-
plugin::api.logMessage(debug, "[profiling_node] Publishing config");
350+
plugin::api.logMessage(loggingLevel::debug, "[profiling_node] Publishing config");
351351
publishEnabled();
352352
}
353353

@@ -368,7 +368,7 @@ static void enableOnV8Thread(uv_async_t *async, int status) {
368368
#endif
369369
if (plugin::enabled) return;
370370
plugin::enabled = true;
371-
plugin::api.logMessage(debug, "[profiling_node] Publishing config");
371+
plugin::api.logMessage(loggingLevel::debug, "[profiling_node] Publishing config");
372372
publishEnabled();
373373

374374
StartTheProfiler();
@@ -385,7 +385,7 @@ static void disableOnV8Thread(uv_async_t *async, int status) {
385385
#endif
386386
if (!plugin::enabled) return;
387387
plugin::enabled = false;
388-
plugin::api.logMessage(debug, "[profiling_node] Publishing config");
388+
plugin::api.logMessage(loggingLevel::debug, "[profiling_node] Publishing config");
389389
publishEnabled();
390390

391391
uv_timer_stop(plugin::timer);
@@ -425,7 +425,7 @@ extern "C" {
425425
std::string enabledProp(plugin::api.getProperty("com.ibm.diagnostics.healthcenter.data.profiling"));
426426
plugin::enabled = (enabledProp == "on");
427427

428-
plugin::api.logMessage(debug, "[profiling_node] Registering push sources");
428+
plugin::api.logMessage(loggingLevel::debug, "[profiling_node] Registering push sources");
429429
pushsource *head = createPushSource(0, "profiling_node");
430430
plugin::provid = provID;
431431
return head;
@@ -449,7 +449,7 @@ extern "C" {
449449
plugin::api.logMessage(fine, "[profiling_node] Starting disabled");
450450
}
451451

452-
plugin::api.logMessage(debug, "[profiling_node] Publishing config");
452+
plugin::api.logMessage(loggingLevel::debug, "[profiling_node] Publishing config");
453453
publishEnabled();
454454

455455
plugin::timer = new uv_timer_t;
@@ -474,10 +474,10 @@ extern "C" {
474474
uv_unref((uv_handle_t*)asyncDisable);
475475

476476
if (plugin::enabled) {
477-
plugin::api.logMessage(debug, "[profiling_node] Start profiling");
477+
plugin::api.logMessage(loggingLevel::debug, "[profiling_node] Start profiling");
478478
StartTheProfiler();
479479

480-
plugin::api.logMessage(debug, "[profiling_node] Starting timer");
480+
plugin::api.logMessage(loggingLevel::debug, "[profiling_node] Starting timer");
481481
uv_timer_start(plugin::timer, OnGatherDataOnV8Thread, getProfilingInterval(), getProfilingInterval());
482482
}
483483

@@ -511,12 +511,12 @@ extern "C" {
511511
if (idstring == "profiling_node") {
512512
//std::stringstream ss;
513513
//ss << "Received message with id [" << idstring << "], size [" << size << "]";
514-
//plugin::api.logMessage(debug, ss.str().c_str());
514+
//plugin::api.logMessage(loggingLevel::debug, ss.str().c_str());
515515

516516
std::string message((const char*) data, size);
517517
//if (size > 0) {
518518
// std::string msg = "Message content [" + message + "]";
519-
// plugin::api.logMessage(debug, msg.c_str());
519+
// plugin::api.logMessage(loggingLevel::debug, msg.c_str());
520520
//}
521521
std::size_t found = message.find(',');
522522
std::string command = message.substr(0, found);
@@ -525,7 +525,7 @@ extern "C" {
525525
if (rest == "profiling_node_subsystem") {
526526
bool enabled = (command == "on");
527527
//std::string msg = "Setting [" + rest + "] to " + (enabled ? "enabled" : "disabled");
528-
//plugin::api.logMessage(debug, msg.c_str());
528+
//plugin::api.logMessage(loggingLevel::debug, msg.c_str());
529529
setEnabled(enabled);
530530

531531
} else if (rest == "profiling_node_v8json"){

0 commit comments

Comments
 (0)