diff options
-rw-r--r-- | src/mongo/db/auth/authz_session_external_state_server_common.cpp | 4 | ||||
-rw-r--r-- | src/mongo/db/auth/security_key.cpp | 4 | ||||
-rw-r--r-- | src/mongo/db/commands.cpp | 8 | ||||
-rw-r--r-- | src/mongo/db/commands/authentication_commands.cpp | 4 | ||||
-rw-r--r-- | src/mongo/db/commands/user_management_commands.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/dbeval.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/range_deleter_db_env.cpp | 4 | ||||
-rw-r--r-- | src/mongo/db/repl/connections.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/repl/health.cpp | 4 | ||||
-rw-r--r-- | src/mongo/db/repl/repl_coordinator_impl.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/repl/rs.cpp | 2 | ||||
-rw-r--r-- | src/mongo/s/mongos_options.cpp | 4 |
12 files changed, 39 insertions, 3 deletions
diff --git a/src/mongo/db/auth/authz_session_external_state_server_common.cpp b/src/mongo/db/auth/authz_session_external_state_server_common.cpp index d6c94dca62f..4ffc69d59e7 100644 --- a/src/mongo/db/auth/authz_session_external_state_server_common.cpp +++ b/src/mongo/db/auth/authz_session_external_state_server_common.cpp @@ -26,6 +26,10 @@ * it in the license file. */ +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kAccessControl + +#include "mongo/platform/basic.h" + #include "mongo/db/auth/authz_session_external_state_server_common.h" #include "mongo/base/status.h" diff --git a/src/mongo/db/auth/security_key.cpp b/src/mongo/db/auth/security_key.cpp index 125dccbac66..221a0c48cf5 100644 --- a/src/mongo/db/auth/security_key.cpp +++ b/src/mongo/db/auth/security_key.cpp @@ -26,6 +26,10 @@ * it in the license file. */ +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kAccessControl + +#include "mongo/platform/basic.h" + #include "mongo/db/auth/security_key.h" #include <sys/stat.h> diff --git a/src/mongo/db/commands.cpp b/src/mongo/db/commands.cpp index 951a8ab8d27..2c1349f328c 100644 --- a/src/mongo/db/commands.cpp +++ b/src/mongo/db/commands.cpp @@ -29,7 +29,9 @@ * then also delete it in the license file. */ -#include "mongo/pch.h" +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kCommands + +#include "mongo/platform/basic.h" #include "mongo/db/commands.h" @@ -51,6 +53,8 @@ namespace mongo { + using logger::LogComponent; + map<string,Command*> * Command::_commandsByBestName; map<string,Command*> * Command::_webCommands; map<string,Command*> * Command::_commands; @@ -317,7 +321,7 @@ namespace mongo { namespace mmb = mutablebson; Status status = _checkAuthorizationImpl(c, client, dbname, cmdObj, fromRepl); if (!status.isOK()) { - log() << status << std::endl; + log(LogComponent::kAccessControl) << status << std::endl; } mmb::Document cmdToLog(cmdObj, mmb::Document::kInPlaceDisabled); c->redactForLogging(&cmdToLog); diff --git a/src/mongo/db/commands/authentication_commands.cpp b/src/mongo/db/commands/authentication_commands.cpp index 9124abc46be..7b4576b2fc7 100644 --- a/src/mongo/db/commands/authentication_commands.cpp +++ b/src/mongo/db/commands/authentication_commands.cpp @@ -26,6 +26,10 @@ * it in the license file. */ +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kAccessControl + +#include "mongo/platform/basic.h" + #include "mongo/db/commands/authentication_commands.h" #include <boost/algorithm/string.hpp> diff --git a/src/mongo/db/commands/user_management_commands.cpp b/src/mongo/db/commands/user_management_commands.cpp index 4139481645f..4449142207c 100644 --- a/src/mongo/db/commands/user_management_commands.cpp +++ b/src/mongo/db/commands/user_management_commands.cpp @@ -26,6 +26,8 @@ * it in the license file. */ +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kAccessControl + #include "mongo/platform/basic.h" #include "mongo/db/commands/user_management_commands.h" diff --git a/src/mongo/db/dbeval.cpp b/src/mongo/db/dbeval.cpp index b34e07058f4..40968770412 100644 --- a/src/mongo/db/dbeval.cpp +++ b/src/mongo/db/dbeval.cpp @@ -28,6 +28,8 @@ * it in the license file. */ +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kCommands + #include "mongo/platform/basic.h" #include <time.h> diff --git a/src/mongo/db/range_deleter_db_env.cpp b/src/mongo/db/range_deleter_db_env.cpp index dcce2025b01..e2362d6d246 100644 --- a/src/mongo/db/range_deleter_db_env.cpp +++ b/src/mongo/db/range_deleter_db_env.cpp @@ -26,6 +26,10 @@ * it in the license file. */ +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kSharding + +#include "mongo/platform/basic.h" + #include "mongo/db/range_deleter_db_env.h" #include "mongo/db/auth/authorization_manager.h" diff --git a/src/mongo/db/repl/connections.cpp b/src/mongo/db/repl/connections.cpp index b5811792a5c..9580b3d82fb 100644 --- a/src/mongo/db/repl/connections.cpp +++ b/src/mongo/db/repl/connections.cpp @@ -28,6 +28,8 @@ * it in the license file. */ +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kReplication + #include "mongo/platform/basic.h" #include "mongo/db/repl/connections.h" diff --git a/src/mongo/db/repl/health.cpp b/src/mongo/db/repl/health.cpp index 665a2df2d56..f46a188c267 100644 --- a/src/mongo/db/repl/health.cpp +++ b/src/mongo/db/repl/health.cpp @@ -26,7 +26,9 @@ * it in the license file. */ -#include "mongo/pch.h" +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kReplication + +#include "mongo/platform/basic.h" #include "mongo/db/repl/health.h" diff --git a/src/mongo/db/repl/repl_coordinator_impl.cpp b/src/mongo/db/repl/repl_coordinator_impl.cpp index 43d199fb41f..8238a8fac62 100644 --- a/src/mongo/db/repl/repl_coordinator_impl.cpp +++ b/src/mongo/db/repl/repl_coordinator_impl.cpp @@ -26,6 +26,8 @@ * it in the license file. */ +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kReplication + #include "mongo/platform/basic.h" #include "mongo/db/repl/repl_coordinator_impl.h" diff --git a/src/mongo/db/repl/rs.cpp b/src/mongo/db/repl/rs.cpp index 34abf39639a..7d2f4ac9b73 100644 --- a/src/mongo/db/repl/rs.cpp +++ b/src/mongo/db/repl/rs.cpp @@ -26,6 +26,8 @@ * it in the license file. */ +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kReplication + #include "mongo/platform/basic.h" #include "mongo/db/repl/rs.h" diff --git a/src/mongo/s/mongos_options.cpp b/src/mongo/s/mongos_options.cpp index a9fe58c1b66..ebbda7bee61 100644 --- a/src/mongo/s/mongos_options.cpp +++ b/src/mongo/s/mongos_options.cpp @@ -26,6 +26,10 @@ * then also delete it in the license file. */ +#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kSharding + +#include "mongo/platform/basic.h" + #include "mongo/s/mongos_options.h" #include <string> |