diff options
author | Gabriel Russell <gabriel.russell@mongodb.com> | 2020-04-29 17:28:15 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-05-18 20:11:34 +0000 |
commit | eafd8199cbd90915088c505e75810de7b4d52f90 (patch) | |
tree | b6338a6128769b479040445b7c86d9630341011b /src/mongo/scripting/mozjs | |
parent | 9395bf07b2c2e6a3204d10543f7d731754bd7c9d (diff) | |
download | mongo-eafd8199cbd90915088c505e75810de7b4d52f90.tar.gz |
SERVER-46932 supress more logging in the shell
Diffstat (limited to 'src/mongo/scripting/mozjs')
-rw-r--r-- | src/mongo/scripting/mozjs/cursor_handle.cpp | 8 | ||||
-rw-r--r-- | src/mongo/scripting/mozjs/global.cpp | 9 | ||||
-rw-r--r-- | src/mongo/scripting/mozjs/implscope.cpp | 23 | ||||
-rw-r--r-- | src/mongo/scripting/mozjs/jsthread.cpp | 2 | ||||
-rw-r--r-- | src/mongo/scripting/mozjs/session.cpp | 8 |
5 files changed, 25 insertions, 25 deletions
diff --git a/src/mongo/scripting/mozjs/cursor_handle.cpp b/src/mongo/scripting/mozjs/cursor_handle.cpp index 55f75160686..be97580db07 100644 --- a/src/mongo/scripting/mozjs/cursor_handle.cpp +++ b/src/mongo/scripting/mozjs/cursor_handle.cpp @@ -77,10 +77,10 @@ void CursorHandleInfo::finalize(js::FreeOp* fop, JSObject* obj) { auto status = exceptionToStatus(); try { - LOGV2(22782, - "Failed to kill cursor {cursorId} due to {status}", - "cursorId"_attr = cursorId, - "status"_attr = status); + LOGV2_INFO(22782, + "Failed to kill cursor {cursorId} due to {status}", + "cursorId"_attr = cursorId, + "status"_attr = status); } catch (...) { // This is here in case logging fails. } diff --git a/src/mongo/scripting/mozjs/global.cpp b/src/mongo/scripting/mozjs/global.cpp index 6092c560966..3ff4f9129ba 100644 --- a/src/mongo/scripting/mozjs/global.cpp +++ b/src/mongo/scripting/mozjs/global.cpp @@ -82,10 +82,11 @@ void GlobalInfo::Functions::print::call(JSContext* cx, JS::CallArgs args) { args.rval().setUndefined(); - LOGV2_OPTIONS(4615635, - logv2::LogOptions(logv2::LogTag::kPlainShell, logv2::LogTruncation::Disabled), - "{message}", - "message"_attr = ss.str()); + LOGV2_INFO_OPTIONS( + 4615635, + logv2::LogOptions(logv2::LogTag::kPlainShell, logv2::LogTruncation::Disabled), + "{message}", + "message"_attr = ss.str()); } void GlobalInfo::Functions::version::call(JSContext* cx, JS::CallArgs args) { diff --git a/src/mongo/scripting/mozjs/implscope.cpp b/src/mongo/scripting/mozjs/implscope.cpp index 85f9b9ae54e..0680ac6a86b 100644 --- a/src/mongo/scripting/mozjs/implscope.cpp +++ b/src/mongo/scripting/mozjs/implscope.cpp @@ -225,13 +225,13 @@ void MozJSImplScope::_gcCallback(JSContext* rt, JSGCStatus status, void* data) { return; } - LOGV2(22787, - "MozJS GC {status_JSGC_BEGIN_prologue_epilogue} heap stats - total: " - "{mongo_sm_get_total_bytes} limit: {mongo_sm_get_max_bytes}", - "status_JSGC_BEGIN_prologue_epilogue"_attr = - (status == JSGC_BEGIN ? "prologue" : "epilogue"), - "mongo_sm_get_total_bytes"_attr = mongo::sm::get_total_bytes(), - "mongo_sm_get_max_bytes"_attr = mongo::sm::get_max_bytes()); + LOGV2_INFO(22787, + "MozJS GC {status_JSGC_BEGIN_prologue_epilogue} heap stats - total: " + "{mongo_sm_get_total_bytes} limit: {mongo_sm_get_max_bytes}", + "status_JSGC_BEGIN_prologue_epilogue"_attr = + (status == JSGC_BEGIN ? "prologue" : "epilogue"), + "mongo_sm_get_total_bytes"_attr = mongo::sm::get_total_bytes(), + "mongo_sm_get_max_bytes"_attr = mongo::sm::get_max_bytes()); } #if __has_feature(address_sanitizer) @@ -929,10 +929,11 @@ bool MozJSImplScope::_checkErrorState(bool success, bool reportError, bool asser } if (reportError) - LOGV2_OPTIONS(4635900, - logv2::LogOptions(logv2::LogTag::kPlainShell, logv2::LogTruncation::Disabled), - "{message}", - "message"_attr = redact(_error)); + LOGV2_INFO_OPTIONS( + 4635900, + logv2::LogOptions(logv2::LogTag::kPlainShell, logv2::LogTruncation::Disabled), + "{message}", + "message"_attr = redact(_error)); // Clear the status state auto status = std::move(_status); diff --git a/src/mongo/scripting/mozjs/jsthread.cpp b/src/mongo/scripting/mozjs/jsthread.cpp index 63c4b980e72..5e039e5b51e 100644 --- a/src/mongo/scripting/mozjs/jsthread.cpp +++ b/src/mongo/scripting/mozjs/jsthread.cpp @@ -27,8 +27,6 @@ * it in the license file. */ -#define MONGO_LOGV2_DEFAULT_COMPONENT ::mongo::logv2::LogComponent::kQuery - #include "mongo/platform/basic.h" #include "mongo/scripting/mozjs/jsthread.h" diff --git a/src/mongo/scripting/mozjs/session.cpp b/src/mongo/scripting/mozjs/session.cpp index 4b205db1e76..16d2906edf2 100644 --- a/src/mongo/scripting/mozjs/session.cpp +++ b/src/mongo/scripting/mozjs/session.cpp @@ -152,10 +152,10 @@ void SessionInfo::finalize(js::FreeOp* fop, JSObject* obj) { auto status = exceptionToStatus(); try { - LOGV2(22791, - "Failed to end session {lsid} due to {status}", - "lsid"_attr = lsid, - "status"_attr = status); + LOGV2_INFO(22791, + "Failed to end session {lsid} due to {status}", + "lsid"_attr = lsid, + "status"_attr = status); } catch (...) { // This is here in case logging fails. } |