From 13135a65811e25a35f86389dcc40a0999fb5888f Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Mon, 20 Apr 2026 22:17:54 +0200 Subject: Rename logging::ToStringView to ToString for consistency (#993) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Renames `logging::ToStringView` → `ToString` and `ShortToStringView` → `ShortToString` for consistency with the rest of the codebase, where `ToString` is the convention for enum-to-string conversions (return type already communicates it's a view). - Updates all call sites in logbase, logging helpers, session log sink, admin service, and tcplogstreamsink. Split off from the `sb/zen-monitor` branch so the ZenServiceClient refactor PR stays focused. --- src/zenserver/storage/admin/admin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/zenserver/storage/admin/admin.cpp') diff --git a/src/zenserver/storage/admin/admin.cpp b/src/zenserver/storage/admin/admin.cpp index f1c2daea4..34d9e570e 100644 --- a/src/zenserver/storage/admin/admin.cpp +++ b/src/zenserver/storage/admin/admin.cpp @@ -720,7 +720,7 @@ HttpAdminService::HttpAdminService(GcScheduler& Scheduler, "logs", [this](HttpRouterRequest& Req) { CbObjectWriter Obj; - auto LogLevel = logging::ToStringView(logging::GetLogLevel()); + auto LogLevel = logging::ToString(logging::GetLogLevel()); Obj.AddString("loglevel", std::string_view(LogLevel.data(), LogLevel.size())); Obj.AddString("Logfile", PathToUtf8(m_LogPaths.AbsLogPath)); Obj.BeginObject("cache"); @@ -772,7 +772,7 @@ HttpAdminService::HttpAdminService(GcScheduler& Scheduler, if (std::string Param(Params.GetValue("loglevel")); Param.empty() == false) { logging::LogLevel NewLevel = logging::ParseLogLevelString(Param); - std::string_view LogLevel = logging::ToStringView(NewLevel); + std::string_view LogLevel = logging::ToString(NewLevel); if (LogLevel != Param) { return Req.ServerRequest().WriteResponse(HttpResponseCode::BadRequest, -- cgit v1.2.3