aboutsummaryrefslogtreecommitdiff
path: root/src/libutil/logging.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/libutil/logging.cc')
-rw-r--r--src/libutil/logging.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libutil/logging.cc b/src/libutil/logging.cc
index 7d61c0611..691b77e95 100644
--- a/src/libutil/logging.cc
+++ b/src/libutil/logging.cc
@@ -266,7 +266,7 @@ static Logger::Fields getFields(nlohmann::json & json)
std::optional<nlohmann::json> parseJSONMessage(const std::string & msg)
{
- if (!hasPrefix(msg, "@nix ")) return std::nullopt;
+ if (!msg.starts_with("@nix ")) return std::nullopt;
try {
return nlohmann::json::parse(std::string(msg, 5));
} catch (std::exception & e) {