summaryrefslogtreecommitdiff
path: root/src/mongo/logger/log_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/logger/log_test.cpp')
-rw-r--r--src/mongo/logger/log_test.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/logger/log_test.cpp b/src/mongo/logger/log_test.cpp
index f4b8ec2bc34..5be29f5d74b 100644
--- a/src/mongo/logger/log_test.cpp
+++ b/src/mongo/logger/log_test.cpp
@@ -384,8 +384,8 @@ void testEncodedLogLine(const MessageEventEphemeral& event, const std::string& e
// Log severity should always be logged as a single capital letter.
TEST_F(LogTestUnadornedEncoder, MessageEventDetailsEncoderLogSeverity) {
Date_t d = Date_t::now();
- StringData ctx("WHAT", StringData::LiteralTag());
- StringData msg("HUH", StringData::LiteralTag());
+ const auto ctx = "WHAT"_sd;
+ const auto msg = "HUH"_sd;
// Severe is indicated by (F)atal.
testEncodedLogLine(MessageEventEphemeral(d, LogSeverity::Severe(), ctx, msg), " F ");
testEncodedLogLine(MessageEventEphemeral(d, LogSeverity::Error(), ctx, msg), " E ");
@@ -407,8 +407,8 @@ TEST_F(LogTestUnadornedEncoder, MessageEventDetailsEncoderLogSeverity) {
// Non-default log component short name should always be logged.
TEST_F(LogTestUnadornedEncoder, MessageEventDetailsEncoderLogComponent) {
Date_t d = Date_t::now();
- StringData ctx("WHAT", StringData::LiteralTag());
- StringData msg("HUH", StringData::LiteralTag());
+ const auto ctx = "WHAT"_sd;
+ const auto msg = "HUH"_sd;
for (int i = 0; i < int(LogComponent::kNumLogComponents); ++i) {
LogComponent component = static_cast<LogComponent::Value>(i);
testEncodedLogLine(MessageEventEphemeral(d, LogSeverity::Info(), component, ctx, msg),