aboutsummaryrefslogtreecommitdiff
path: root/src/zencore/logging/tracesink.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2026-04-23 18:16:57 +0200
committerStefan Boberg <[email protected]>2026-04-23 18:16:57 +0200
commit0232b991cd7d8e3a2114ea30e4591dd3e7b65c36 (patch)
tree94730e7594fd09ae1fa820391ce311f6daf13905 /src/zencore/logging/tracesink.cpp
parentFix forward declaration order for s_GotSigWinch and SigWinchHandler (diff)
parenttrace: declare Region event name fields as AnsiString (#1012) (diff)
downloadarchived-zen-sb/zen-help.tar.xz
archived-zen-sb/zen-help.zip
Merge branch 'main' into sb/zen-helpsb/zen-help
- Combine HelpCommand (this branch) with HistoryCommand (main) in zen CLI dispatcher - Keep filter-aware TuiPickOne rewrite; adopt main's ASCII arrow glyphs in doc comment
Diffstat (limited to 'src/zencore/logging/tracesink.cpp')
-rw-r--r--src/zencore/logging/tracesink.cpp92
1 files changed, 0 insertions, 92 deletions
diff --git a/src/zencore/logging/tracesink.cpp b/src/zencore/logging/tracesink.cpp
deleted file mode 100644
index 8a6f4e40c..000000000
--- a/src/zencore/logging/tracesink.cpp
+++ /dev/null
@@ -1,92 +0,0 @@
-
-// Copyright Epic Games, Inc. All Rights Reserved.
-
-#include <zencore/logbase.h>
-#include <zencore/logging/tracesink.h>
-#include <zencore/string.h>
-#include <zencore/timer.h>
-#include <zencore/trace.h>
-
-#if ZEN_WITH_TRACE
-
-namespace zen::logging {
-
-UE_TRACE_CHANNEL_DEFINE(LogChannel)
-
-UE_TRACE_EVENT_BEGIN(Logging, LogCategory, NoSync | Important)
- UE_TRACE_EVENT_FIELD(const void*, CategoryPointer)
- UE_TRACE_EVENT_FIELD(uint8_t, DefaultVerbosity)
- UE_TRACE_EVENT_FIELD(UE::Trace::AnsiString, Name)
-UE_TRACE_EVENT_END()
-
-UE_TRACE_EVENT_BEGIN(Logging, LogMessageSpec, NoSync | Important)
- UE_TRACE_EVENT_FIELD(const void*, LogPoint)
- UE_TRACE_EVENT_FIELD(const void*, CategoryPointer)
- UE_TRACE_EVENT_FIELD(int32_t, Line)
- UE_TRACE_EVENT_FIELD(uint8_t, Verbosity)
- UE_TRACE_EVENT_FIELD(UE::Trace::AnsiString, FileName)
- UE_TRACE_EVENT_FIELD(UE::Trace::AnsiString, FormatString)
-UE_TRACE_EVENT_END()
-
-UE_TRACE_EVENT_BEGIN(Logging, LogMessage, NoSync)
- UE_TRACE_EVENT_FIELD(const void*, LogPoint)
- UE_TRACE_EVENT_FIELD(uint64_t, Cycle)
- UE_TRACE_EVENT_FIELD(uint8_t[], FormatArgs)
-UE_TRACE_EVENT_END()
-
-void
-TraceLogCategory(const logging::Logger* Category, const char* Name, logging::LogLevel DefaultVerbosity)
-{
- uint16_t NameLen = uint16_t(strlen(Name));
- UE_TRACE_LOG(Logging, LogCategory, LogChannel, NameLen * sizeof(ANSICHAR))
- << LogCategory.CategoryPointer(Category) << LogCategory.DefaultVerbosity(uint8_t(DefaultVerbosity))
- << LogCategory.Name(Name, NameLen);
-}
-
-void
-TraceLogMessageSpec(const void* LogPoint,
- const logging::Logger* Category,
- logging::LogLevel Verbosity,
- const std::string_view File,
- int32_t Line,
- const std::string_view Format)
-{
- uint16_t FileNameLen = uint16_t(File.size());
- uint16_t FormatStringLen = uint16_t(Format.size());
- uint32_t DataSize = (FileNameLen * sizeof(ANSICHAR)) + (FormatStringLen * sizeof(ANSICHAR));
- UE_TRACE_LOG(Logging, LogMessageSpec, LogChannel, DataSize)
- << LogMessageSpec.LogPoint(LogPoint) << LogMessageSpec.CategoryPointer(Category) << LogMessageSpec.Line(Line)
- << LogMessageSpec.Verbosity(uint8_t(Verbosity)) << LogMessageSpec.FileName(File.data(), FileNameLen)
- << LogMessageSpec.FormatString(Format.data(), FormatStringLen);
-}
-
-void
-TraceLogMessageInternal(const void* LogPoint, int32_t EncodedFormatArgsSize, const uint8_t* EncodedFormatArgs)
-{
- UE_TRACE_LOG(Logging, LogMessage, LogChannel) << LogMessage.LogPoint(LogPoint) << LogMessage.Cycle(GetHifreqTimerValue())
- << LogMessage.FormatArgs(EncodedFormatArgs, EncodedFormatArgsSize);
-}
-
-//////////////////////////////////////////////////////////////////////////
-
-void
-TraceSink::Log(const LogMessage& Msg)
-{
- ZEN_UNUSED(Msg);
-}
-
-void
-TraceSink::Flush()
-{
-}
-
-void
-TraceSink::SetFormatter(std::unique_ptr<Formatter> /*InFormatter*/)
-{
- // This sink doesn't use a formatter since it just forwards the raw format
- // args to the trace system
-}
-
-} // namespace zen::logging
-
-#endif