-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
113 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Submodule logger
deleted from
63659e
Submodule plugify
updated
85 files
Submodule sourcesdk
updated
from 8bd9f8 to 63409a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,38 @@ | ||
#pragma once | ||
|
||
#include <functional> | ||
#include <string> | ||
#include <string_view> | ||
|
||
#include <tier0/dbg.h> | ||
#include <tier0/logging.h> | ||
|
||
#include <plugify/log.h> | ||
#include <plugify/compat_format.h> | ||
|
||
#include <logger.hpp> | ||
|
||
namespace plugifyMM | ||
{ | ||
using MMLoggerBase = Logger; | ||
|
||
class MMLogger final : public MMLoggerBase, public plugify::ILogger | ||
class MMLogger final : public plugify::ILogger | ||
{ | ||
public: | ||
using Base = MMLoggerBase; | ||
using Base::Base; | ||
|
||
MMLogger(const char *name, RegisterTagsFunc registerTagsFunc, int flags = 0, LoggingVerbosity_t verbosity = LV_DEFAULT, const Color &defaultColor = UNSPECIFIED_LOGGING_COLOR); | ||
~MMLogger() override = default; | ||
|
||
void SetSeverity(plugify::Severity severity); | ||
bool IsChannelEnabled(LoggingSeverity_t severity) const; | ||
bool IsChannelEnabled(LoggingVerbosity_t verbosity) const; | ||
LoggingVerbosity_t GetChannelVerbosity() const; | ||
Color GetColor() const; | ||
LoggingChannelFlags_t GetFlags() const; | ||
|
||
LoggingResponse_t Log(LoggingSeverity_t severity, const char *message) const; | ||
LoggingResponse_t Log(LoggingSeverity_t severity, const Color &color, const char *message) const; | ||
LoggingResponse_t Log(LoggingSeverity_t severity, const LeafCodeInfo_t &code, const char *message) const; | ||
LoggingResponse_t Log(LoggingSeverity_t severity, const LeafCodeInfo_t &code, const Color &color, const char *message) const; | ||
|
||
public: // plugify::ILogger | ||
void Log(std::string_view message, plugify::Severity severity); | ||
/*plugify*/ | ||
void Log(std::string_view message, plugify::Severity severity) override; | ||
void SetSeverity(plugify::Severity severity); | ||
|
||
private: | ||
plugify::Severity m_severity { plugify::Severity::None }; | ||
plugify::Severity m_severity{ plugify::Severity::None }; | ||
LoggingChannelID_t m_channelID; | ||
}; | ||
} // namespace plugifyMM |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters