diff options
author | single <single@yandex-team.ru> | 2022-02-10 16:50:29 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:50:29 +0300 |
commit | 8ae96df130bbede609c3504aa9af1bc6ff5361b3 (patch) | |
tree | 4751832974bd75ca721269aa54faa15d76032dfb /library/cpp/actors/core | |
parent | 5d4e7b7c923852e0f6398791ec98a60cf9faab46 (diff) | |
download | ydb-8ae96df130bbede609c3504aa9af1bc6ff5361b3.tar.gz |
Restoring authorship annotation for <single@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/actors/core')
-rw-r--r-- | library/cpp/actors/core/actor.cpp | 20 | ||||
-rw-r--r-- | library/cpp/actors/core/actor.h | 24 | ||||
-rw-r--r-- | library/cpp/actors/core/event.h | 10 | ||||
-rw-r--r-- | library/cpp/actors/core/events.h | 36 | ||||
-rw-r--r-- | library/cpp/actors/core/executor_pool_base.cpp | 8 | ||||
-rw-r--r-- | library/cpp/actors/core/executor_thread.cpp | 10 | ||||
-rw-r--r-- | library/cpp/actors/core/executor_thread.h | 2 | ||||
-rw-r--r-- | library/cpp/actors/core/log.cpp | 26 | ||||
-rw-r--r-- | library/cpp/actors/core/log.h | 12 | ||||
-rw-r--r-- | library/cpp/actors/core/log_iface.h | 56 | ||||
-rw-r--r-- | library/cpp/actors/core/log_settings.cpp | 6 | ||||
-rw-r--r-- | library/cpp/actors/core/log_settings.h | 22 |
12 files changed, 116 insertions, 116 deletions
diff --git a/library/cpp/actors/core/actor.cpp b/library/cpp/actors/core/actor.cpp index 6f9ba6a42b..243a3e1a86 100644 --- a/library/cpp/actors/core/actor.cpp +++ b/library/cpp/actors/core/actor.cpp @@ -16,15 +16,15 @@ namespace NActors { } void IActor::Registered(TActorSystem* sys, const TActorId& owner) { - // fallback to legacy method, do not use it anymore - if (auto eh = AfterRegister(SelfId(), owner)) - sys->Send(eh); - } - - void IActor::Describe(IOutputStream &out) const noexcept { - SelfActorId.Out(out); - } - + // fallback to legacy method, do not use it anymore + if (auto eh = AfterRegister(SelfId(), owner)) + sys->Send(eh); + } + + void IActor::Describe(IOutputStream &out) const noexcept { + SelfActorId.Out(out); + } + bool IActor::Send(const TActorId& recipient, IEventBase* ev, ui32 flags, ui64 cookie, NWilson::TTraceId traceId) const noexcept { return SelfActorId.Send(recipient, ev, flags, cookie, std::move(traceId)); } @@ -123,7 +123,7 @@ namespace NActors { TlsActivationContext->ExecutorThread.Schedule(deadline, new IEventHandle(SelfActorId, TActorId(), ev), cookie); } - void IActor::Schedule(TDuration delta, IEventBase* ev, ISchedulerCookie* cookie) const noexcept { + void IActor::Schedule(TDuration delta, IEventBase* ev, ISchedulerCookie* cookie) const noexcept { TlsActivationContext->ExecutorThread.Schedule(delta, new IEventHandle(SelfActorId, TActorId(), ev), cookie); } diff --git a/library/cpp/actors/core/actor.h b/library/cpp/actors/core/actor.h index ed29bd14b9..7a414bad1c 100644 --- a/library/cpp/actors/core/actor.h +++ b/library/cpp/actors/core/actor.h @@ -6,7 +6,7 @@ #include <library/cpp/actors/util/local_process_key.h> namespace NActors { - class TActorSystem; + class TActorSystem; class TMailboxTable; struct TMailboxHeader; @@ -169,11 +169,11 @@ namespace NActors { void Schedule(TDuration delta, IEventBase* ev, ISchedulerCookie* cookie = nullptr) const; }; - class IActor; - - class IActorOps : TNonCopyable { + class IActor; + + class IActorOps : TNonCopyable { public: - virtual void Describe(IOutputStream&) const noexcept = 0; + virtual void Describe(IOutputStream&) const noexcept = 0; virtual bool Send(const TActorId& recipient, IEventBase*, ui32 flags = 0, ui64 cookie = 0, NWilson::TTraceId traceId = {}) const noexcept = 0; /** @@ -205,12 +205,12 @@ namespace NActors { virtual TActorId Register(IActor*, TMailboxType::EType mailboxType = TMailboxType::HTSwap, ui32 poolId = Max<ui32>()) const noexcept = 0; virtual TActorId RegisterWithSameMailbox(IActor*) const noexcept = 0; - }; - + }; + class TDecorator; - class IActor : protected IActorOps { - public: + class IActor : protected IActorOps { + public: typedef void (IActor::*TReceiveFunc)(TAutoPtr<IEventHandle>& ev, const TActorContext& ctx); private: @@ -324,7 +324,7 @@ namespace NActors { } virtual void Registered(TActorSystem* sys, const TActorId& owner); - + virtual TAutoPtr<IEventHandle> AfterRegister(const TActorId& self, const TActorId& parentId) { Y_UNUSED(self); Y_UNUSED(parentId); @@ -349,7 +349,7 @@ namespace NActors { } protected: - void Describe(IOutputStream&) const noexcept override; + void Describe(IOutputStream&) const noexcept override; bool Send(const TActorId& recipient, IEventBase* ev, ui32 flags = 0, ui64 cookie = 0, NWilson::TTraceId traceId = {}) const noexcept final; template <typename TEvent> bool Send(const TActorId& recipient, THolder<TEvent> ev, ui32 flags = 0, ui64 cookie = 0, NWilson::TTraceId traceId = {}) const{ @@ -363,7 +363,7 @@ namespace NActors { void Schedule(TInstant deadline, IEventBase* ev, ISchedulerCookie* cookie = nullptr) const noexcept final; void Schedule(TMonotonic deadline, IEventBase* ev, ISchedulerCookie* cookie = nullptr) const noexcept final; - void Schedule(TDuration delta, IEventBase* ev, ISchedulerCookie* cookie = nullptr) const noexcept final; + void Schedule(TDuration delta, IEventBase* ev, ISchedulerCookie* cookie = nullptr) const noexcept final; // register new actor in ActorSystem on new fresh mailbox. TActorId Register(IActor* actor, TMailboxType::EType mailboxType = TMailboxType::HTSwap, ui32 poolId = Max<ui32>()) const noexcept final; diff --git a/library/cpp/actors/core/event.h b/library/cpp/actors/core/event.h index 6ff02aaf94..745bbd28f4 100644 --- a/library/cpp/actors/core/event.h +++ b/library/cpp/actors/core/event.h @@ -59,11 +59,11 @@ namespace NActors { public: template <typename TEv> inline TEv* CastAsLocal() const noexcept { - auto fits = GetTypeRewrite() == TEv::EventType; - - return fits ? static_cast<TEv*>(Event.Get()) : nullptr; - } - + auto fits = GetTypeRewrite() == TEv::EventType; + + return fits ? static_cast<TEv*>(Event.Get()) : nullptr; + } + template <typename TEventType> TEventType* Get() { if (Type != TEventType::EventType) diff --git a/library/cpp/actors/core/events.h b/library/cpp/actors/core/events.h index 702cf50fad..984cb51523 100644 --- a/library/cpp/actors/core/events.h +++ b/library/cpp/actors/core/events.h @@ -85,23 +85,23 @@ namespace NActors { Unsubscribe, // generic unsubscribe from something Delivered, // event delivered Undelivered, // event undelivered - Poison, // request actor to shutdown + Poison, // request actor to shutdown Completed, // generic async job result event - PoisonTaken, // generic Poison taken (reply to PoisonPill event, i.e. died completely) + PoisonTaken, // generic Poison taken (reply to PoisonPill event, i.e. died completely) FlushLog, CallbackCompletion, CallbackException, - Gone, // Generic notification of actor death + Gone, // Generic notification of actor death TrackActor, UntrackActor, InvokeResult, CoroTimeout, InvokeQuery, - End, - + End, + // Compatibility section - PoisonPill = Poison, - ActorDied = Gone, + PoisonPill = Poison, + ActorDied = Gone, }; static_assert(End < EventSpaceEnd(ES_SYSTEM), "expect End < EventSpaceEnd(ES_SYSTEM)"); @@ -111,16 +111,16 @@ namespace NActors { DEFINE_SIMPLE_LOCAL_EVENT(TEvBootstrap, "System: TEvBootstrap") }; - struct TEvPoison : public TEventBase<TEvPoison, TSystem::Poison> { - DEFINE_SIMPLE_NONLOCAL_EVENT(TEvPoison, "System: TEvPoison") + struct TEvPoison : public TEventBase<TEvPoison, TSystem::Poison> { + DEFINE_SIMPLE_NONLOCAL_EVENT(TEvPoison, "System: TEvPoison") }; struct TEvWakeup: public TEventBase<TEvWakeup, TSystem::Wakeup> { DEFINE_SIMPLE_LOCAL_EVENT(TEvWakeup, "System: TEvWakeup") - - TEvWakeup(ui64 tag = 0) : Tag(tag) { } - - const ui64 Tag = 0; + + TEvWakeup(ui64 tag = 0) : Tag(tag) { } + + const ui64 Tag = 0; }; struct TEvSubscribe: public TEventBase<TEvSubscribe, TSystem::Subscribe> { @@ -205,14 +205,14 @@ namespace NActors { } }; - struct TEvGone: public TEventBase<TEvGone, TSystem::Gone> { - DEFINE_SIMPLE_LOCAL_EVENT(TEvGone, "System: TEvGone") + struct TEvGone: public TEventBase<TEvGone, TSystem::Gone> { + DEFINE_SIMPLE_LOCAL_EVENT(TEvGone, "System: TEvGone") }; - + struct TEvInvokeResult; - using TEvPoisonPill = TEvPoison; // Legacy name, deprecated - using TEvActorDied = TEvGone; + using TEvPoisonPill = TEvPoison; // Legacy name, deprecated + using TEvActorDied = TEvGone; }; } diff --git a/library/cpp/actors/core/executor_pool_base.cpp b/library/cpp/actors/core/executor_pool_base.cpp index c3b9999168..1fb66adc61 100644 --- a/library/cpp/actors/core/executor_pool_base.cpp +++ b/library/cpp/actors/core/executor_pool_base.cpp @@ -8,8 +8,8 @@ namespace NActors { LWTRACE_USING(ACTORLIB_PROVIDER); void DoActorInit(TActorSystem* sys, IActor* actor, const TActorId& self, const TActorId& owner) { - actor->SelfActorId = self; - actor->Registered(sys, owner); + actor->SelfActorId = self; + actor->Registered(sys, owner); } TExecutorPoolBaseMailboxed::TExecutorPoolBaseMailboxed(ui32 poolId, ui32 maxActivityType) @@ -98,7 +98,7 @@ namespace NActors { // do init const TActorId actorId(ActorSystem->NodeId, PoolId, localActorId, hint); - DoActorInit(ActorSystem, actor, actorId, parentId); + DoActorInit(ActorSystem, actor, actorId, parentId); // Once we unlock the mailbox the actor starts running and we cannot use the pointer any more actor = nullptr; @@ -145,7 +145,7 @@ namespace NActors { mailbox->AttachActor(localActorId, actor); const TActorId actorId(ActorSystem->NodeId, PoolId, localActorId, hint); - DoActorInit(ActorSystem, actor, actorId, parentId); + DoActorInit(ActorSystem, actor, actorId, parentId); NHPTimer::STime elapsed = GetCycleCountFast() - hpstart; if (elapsed > 1000000) { LWPROBE(SlowRegisterAdd, PoolId, NHPTimer::GetSeconds(elapsed) * 1000.0); diff --git a/library/cpp/actors/core/executor_thread.cpp b/library/cpp/actors/core/executor_thread.cpp index 446b651efd..7a34944ae2 100644 --- a/library/cpp/actors/core/executor_thread.cpp +++ b/library/cpp/actors/core/executor_thread.cpp @@ -67,10 +67,10 @@ namespace NActors { DyingActors.push_back(THolder(actor)); } - void TExecutorThread::DropUnregistered() { - DyingActors.clear(); // here is actual destruction of actors - } - + void TExecutorThread::DropUnregistered() { + DyingActors.clear(); // here is actual destruction of actors + } + void TExecutorThread::Schedule(TInstant deadline, TAutoPtr<IEventHandle> ev, ISchedulerCookie* cookie) { ++CurrentActorScheduledEventsCounter; Ctx.Executor->Schedule(deadline, ev, cookie, Ctx.WorkerId); @@ -181,7 +181,7 @@ namespace NActors { size_t dyingActorsCnt = DyingActors.size(); Ctx.UpdateActorsStats(dyingActorsCnt); if (dyingActorsCnt) { - DropUnregistered(); + DropUnregistered(); actor = nullptr; } diff --git a/library/cpp/actors/core/executor_thread.h b/library/cpp/actors/core/executor_thread.h index 9d3c573f0d..a1ef9786f6 100644 --- a/library/cpp/actors/core/executor_thread.h +++ b/library/cpp/actors/core/executor_thread.h @@ -43,7 +43,7 @@ namespace NActors { const TActorId& parentId = TActorId()); TActorId RegisterActor(IActor* actor, TMailboxHeader* mailbox, ui32 hint, const TActorId& parentId = TActorId()); void UnregisterActor(TMailboxHeader* mailbox, ui64 localActorId); - void DropUnregistered(); + void DropUnregistered(); const std::vector<THolder<IActor>>& GetUnregistered() const { return DyingActors; } void Schedule(TInstant deadline, TAutoPtr<IEventHandle> ev, ISchedulerCookie* cookie = nullptr); diff --git a/library/cpp/actors/core/log.cpp b/library/cpp/actors/core/log.cpp index 5f63b5af58..ca0c6e60ea 100644 --- a/library/cpp/actors/core/log.cpp +++ b/library/cpp/actors/core/log.cpp @@ -251,11 +251,11 @@ namespace NActors { const auto prio = ev.Level.ToPrio(); - switch (prio) { - case ::NActors::NLog::EPrio::Alert: + switch (prio) { + case ::NActors::NLog::EPrio::Alert: Metrics->IncAlertMsgs(); break; - case ::NActors::NLog::EPrio::Emerg: + case ::NActors::NLog::EPrio::Emerg: Metrics->IncEmergMsgs(); break; default: @@ -344,10 +344,10 @@ namespace NActors { str << "<a href='logger?c=" << i << "'>" << name << "</a>"; } TABLED() { - str << PriorityToString(EPrio(componentSettings.Raw.X.Level)); + str << PriorityToString(EPrio(componentSettings.Raw.X.Level)); } TABLED() { - str << PriorityToString(EPrio(componentSettings.Raw.X.SamplingLevel)); + str << PriorityToString(EPrio(componentSettings.Raw.X.SamplingLevel)); } TABLED() { str << componentSettings.Raw.X.SamplingRate; @@ -421,11 +421,11 @@ namespace NActors { UL() { LI() { str << "Priority: " - << NLog::PriorityToString(NLog::EPrio(componentSettings.Raw.X.Level)); + << NLog::PriorityToString(NLog::EPrio(componentSettings.Raw.X.Level)); } LI() { str << "Sampling priority: " - << NLog::PriorityToString(NLog::EPrio(componentSettings.Raw.X.SamplingLevel)); + << NLog::PriorityToString(NLog::EPrio(componentSettings.Raw.X.SamplingLevel)); } LI() { str << "Sampling rate: " @@ -444,7 +444,7 @@ namespace NActors { for (int p = NLog::PRI_EMERG; p <= NLog::PRI_TRACE; ++p) { LI() { str << "<a href='logger?c=" << component << "&p=" << p << "'>" - << NLog::PriorityToString(NLog::EPrio(p)) << "</a>"; + << NLog::PriorityToString(NLog::EPrio(p)) << "</a>"; } } } @@ -455,7 +455,7 @@ namespace NActors { for (int p = NLog::PRI_EMERG; p <= NLog::PRI_TRACE; ++p) { LI() { str << "<a href='logger?c=" << component << "&sp=" << p << "'>" - << NLog::PriorityToString(NLog::EPrio(p)) << "</a>"; + << NLog::PriorityToString(NLog::EPrio(p)) << "</a>"; } } } @@ -519,7 +519,7 @@ namespace NActors { TABLER() { TABLED() { str << "<a href = 'logger?c=-1&p=" << p << "'>" - << NLog::PriorityToString(NLog::EPrio(p)) << "</a>"; + << NLog::PriorityToString(NLog::EPrio(p)) << "</a>"; } } } @@ -541,7 +541,7 @@ namespace NActors { TABLER() { TABLED() { str << "<a href = 'logger?c=-1&sp=" << p << "'>" - << NLog::PriorityToString(NLog::EPrio(p)) << "</a>"; + << NLog::PriorityToString(NLog::EPrio(p)) << "</a>"; } } } @@ -576,8 +576,8 @@ namespace NActors { bool TLoggerActor::OutputRecord(TInstant time, NLog::EPrio priority, NLog::EComponent component, const TString& formatted) noexcept try { - const auto logPrio = ::ELogPriority(ui16(priority)); - + const auto logPrio = ::ELogPriority(ui16(priority)); + char buf[TimeBufSize]; switch (Settings->Format) { case NActors::NLog::TSettings::PLAIN_FULL_FORMAT: { diff --git a/library/cpp/actors/core/log.h b/library/cpp/actors/core/log.h index c11a7cf3c1..65e75b9909 100644 --- a/library/cpp/actors/core/log.h +++ b/library/cpp/actors/core/log.h @@ -2,7 +2,7 @@ #include "defs.h" -#include "log_iface.h" +#include "log_iface.h" #include "log_settings.h" #include "actorsystem.h" #include "events.h" @@ -122,7 +122,7 @@ namespace NActors { //////////////////////////////////////////////////////////////////////////////// // SET LOG LEVEL FOR A COMPONENT //////////////////////////////////////////////////////////////////////////////// - class TLogComponentLevelRequest: public TEventLocal<TLogComponentLevelRequest, int(NLog::EEv::LevelReq)> { + class TLogComponentLevelRequest: public TEventLocal<TLogComponentLevelRequest, int(NLog::EEv::LevelReq)> { public: // set given priority for the component TLogComponentLevelRequest(NLog::EPriority priority, NLog::EComponent component) @@ -145,7 +145,7 @@ namespace NActors { friend class TLoggerActor; }; - class TLogComponentLevelResponse: public TEventLocal<TLogComponentLevelResponse, int(NLog::EEv::LevelResp)> { + class TLogComponentLevelResponse: public TEventLocal<TLogComponentLevelResponse, int(NLog::EEv::LevelResp)> { public: TLogComponentLevelResponse(int code, const TString& explanation) : Code(code) @@ -166,7 +166,7 @@ namespace NActors { TString Explanation; }; - class TLogIgnored: public TEventLocal<TLogIgnored, int(NLog::EEv::Ignored)> { + class TLogIgnored: public TEventLocal<TLogIgnored, int(NLog::EEv::Ignored)> { public: TLogIgnored() { } @@ -213,7 +213,7 @@ namespace NActors { void StateFunc(TAutoPtr<IEventHandle>& ev, const TActorContext& ctx) { switch (ev->GetTypeRewrite()) { HFunc(TLogIgnored, HandleIgnoredEvent); - HFunc(NLog::TEvLog, HandleLogEvent); + HFunc(NLog::TEvLog, HandleLogEvent); HFunc(TLogComponentLevelRequest, HandleLogComponentLevelRequest); HFunc(NMon::TEvHttpInfo, HandleMonInfo); } @@ -246,7 +246,7 @@ namespace NActors { void BecomeDefunct(); void HandleIgnoredEvent(TLogIgnored::TPtr& ev, const NActors::TActorContext& ctx); void HandleIgnoredEventDrop(); - void HandleLogEvent(NLog::TEvLog::TPtr& ev, const TActorContext& ctx); + void HandleLogEvent(NLog::TEvLog::TPtr& ev, const TActorContext& ctx); void HandleLogEventDrop(const NLog::TEvLog::TPtr& ev); void HandleLogComponentLevelRequest(TLogComponentLevelRequest::TPtr& ev, const TActorContext& ctx); void HandleMonInfo(NMon::TEvHttpInfo::TPtr& ev, const TActorContext& ctx); diff --git a/library/cpp/actors/core/log_iface.h b/library/cpp/actors/core/log_iface.h index b331db9ca8..0ca9c14b91 100644 --- a/library/cpp/actors/core/log_iface.h +++ b/library/cpp/actors/core/log_iface.h @@ -1,12 +1,12 @@ -#pragma once - -#include "events.h" -#include "event_local.h" - -namespace NActors { +#pragma once + +#include "events.h" +#include "event_local.h" + +namespace NActors { namespace NLog { using EComponent = int; - + enum EPriority : ui16 { // migrate it to EPrio whenever possible PRI_EMERG, PRI_ALERT, @@ -18,7 +18,7 @@ namespace NActors { PRI_DEBUG, PRI_TRACE }; - + enum class EPrio : ui16 { Emerg = 0, Alert = 1, @@ -30,39 +30,39 @@ namespace NActors { Debug = 7, Trace = 8, }; - + struct TLevel { TLevel(ui32 raw) : Raw(raw) { } - + TLevel(EPrio prio) : Raw((ui16(prio) + 1) << 8) { } - + EPrio ToPrio() const noexcept { const auto major = Raw >> 8; - + return major > 0 ? EPrio(major - 1) : EPrio::Emerg; } - + bool IsUrgentAbortion() const noexcept { return (Raw >> 8) == 0; } - + /* Generalized monotonic level value composed with major and minor - levels. Minor is used for verbosity within major, basic EPrio - mapped to (EPrio + 1, 0) and Major = 0 is reserved as special - space with meaning like EPrio::Emerg but with extened actions. - Thus logger should map Major = 0 to EPrio::Emerg if it have no - idea how to handle special emergency actions. - */ - + levels. Minor is used for verbosity within major, basic EPrio + mapped to (EPrio + 1, 0) and Major = 0 is reserved as special + space with meaning like EPrio::Emerg but with extened actions. + Thus logger should map Major = 0 to EPrio::Emerg if it have no + idea how to handle special emergency actions. + */ + ui32 Raw = 0; // ((ui16(EPrio) + 1) << 8) | ui8(minor) }; - + enum class EEv { Log = EventSpaceBegin(TEvents::ES_LOGGER), LevelReq, @@ -70,9 +70,9 @@ namespace NActors { Ignored, End }; - + static_assert(int(EEv::End) < EventSpaceEnd(TEvents::ES_LOGGER), ""); - + class TEvLog: public TEventLocal<TEvLog, int(EEv::Log)> { public: TEvLog(TInstant stamp, TLevel level, EComponent comp, const TString &line) @@ -90,7 +90,7 @@ namespace NActors { , Line(std::move(line)) { } - + TEvLog(EPriority prio, EComponent comp, TString line, TInstant time = TInstant::Now()) : Stamp(time) , Level(EPrio(prio)) @@ -98,12 +98,12 @@ namespace NActors { , Line(std::move(line)) { } - + const TInstant Stamp = TInstant::Max(); const TLevel Level; const EComponent Component = 0; TString Line; }; - + } -} +} diff --git a/library/cpp/actors/core/log_settings.cpp b/library/cpp/actors/core/log_settings.cpp index f52f2fc5d2..5a5b66b4ac 100644 --- a/library/cpp/actors/core/log_settings.cpp +++ b/library/cpp/actors/core/log_settings.cpp @@ -116,7 +116,7 @@ namespace NActors { str << titleName << " for all components has been changed to " - << PriorityToString(EPrio(priority)); + << PriorityToString(EPrio(priority)); explanation = str.Str(); return 0; } else { @@ -136,8 +136,8 @@ namespace NActors { AtomicSet(ComponentInfo[component], settings.Raw.Data); TStringStream str; str << titleName << " for the component " << ComponentNames[component] - << " has been changed from " << PriorityToString(EPrio(oldPriority)) - << " to " << PriorityToString(EPrio(priority)); + << " has been changed from " << PriorityToString(EPrio(oldPriority)) + << " to " << PriorityToString(EPrio(priority)); explanation = str.Str(); return 0; } diff --git a/library/cpp/actors/core/log_settings.h b/library/cpp/actors/core/log_settings.h index 7fe4504edd..7f9ea16553 100644 --- a/library/cpp/actors/core/log_settings.h +++ b/library/cpp/actors/core/log_settings.h @@ -1,32 +1,32 @@ #pragma once #include "actor.h" -#include "log_iface.h" +#include "log_iface.h" #include <util/generic/vector.h> #include <util/digest/murmur.h> #include <util/random/easy.h> namespace NActors { namespace NLog { - inline const char* PriorityToString(EPrio priority) { + inline const char* PriorityToString(EPrio priority) { switch (priority) { - case EPrio::Emerg: + case EPrio::Emerg: return "EMERG"; - case EPrio::Alert: + case EPrio::Alert: return "ALERT"; - case EPrio::Crit: + case EPrio::Crit: return "CRIT"; - case EPrio::Error: + case EPrio::Error: return "ERROR"; - case EPrio::Warn: + case EPrio::Warn: return "WARN"; - case EPrio::Notice: + case EPrio::Notice: return "NOTICE"; - case EPrio::Info: + case EPrio::Info: return "INFO"; - case EPrio::Debug: + case EPrio::Debug: return "DEBUG"; - case EPrio::Trace: + case EPrio::Trace: return "TRACE"; default: return "UNKNOWN"; |