Core/Logging reduce difference between branches
This commit is contained in:
1 parent
6468d7004c
commit
c22ba4438e
4 files changed
+7
-8
No files matched your search
@@ -44,11 +44,11 @@ const uint8 MaxColors = uint8(WHITE) + 1;
|
||||
class TC_COMMON_API AppenderConsole : public Appender
|
||||
{
|
||||
public:
|
||||
typedef std::integral_constant<AppenderType, APPENDER_CONSOLE>::type TypeIndex;
|
||||
static constexpr AppenderType type = APPENDER_CONSOLE;
|
||||
|
||||
AppenderConsole(uint8 _id, std::string const& name, LogLevel level, AppenderFlags flags, std::vector<char const*> extraArgs);
|
||||
void InitColors(const std::string& init_str);
|
||||
AppenderType getType() const override { return TypeIndex::value; }
|
||||
AppenderType getType() const override { return type; }
|
||||
|
||||
private:
|
||||
void SetColor(bool stdout_stream, ColorTypes color);
|
||||
|
||||
@@ -24,12 +24,12 @@
|
||||
class TC_COMMON_API AppenderFile : public Appender
|
||||
{
|
||||
public:
|
||||
typedef std::integral_constant<AppenderType, APPENDER_FILE>::type TypeIndex;
|
||||
static constexpr AppenderType type = APPENDER_FILE;
|
||||
|
||||
AppenderFile(uint8 id, std::string const& name, LogLevel level, AppenderFlags flags, std::vector<char const*> extraArgs);
|
||||
~AppenderFile();
|
||||
FILE* OpenFile(std::string const& name, std::string const& mode, bool backup);
|
||||
AppenderType getType() const override { return TypeIndex::value; }
|
||||
AppenderType getType() const override { return type; }
|
||||
|
||||
private:
|
||||
void CloseFile();
|
||||
|
||||
@@ -92,8 +92,7 @@ class TC_COMMON_API Log
|
||||
template <class AppenderImpl>
|
||||
void RegisterAppender()
|
||||
{
|
||||
using Index = typename AppenderImpl::TypeIndex;
|
||||
RegisterAppender(Index::value, &CreateAppender<AppenderImpl>);
|
||||
RegisterAppender(AppenderImpl::type, &CreateAppender<AppenderImpl>);
|
||||
}
|
||||
|
||||
std::string const& GetLogsDir() const { return m_logsDir; }
|
||||
|
||||
@@ -23,13 +23,13 @@
|
||||
class TC_DATABASE_API AppenderDB: public Appender
|
||||
{
|
||||
public:
|
||||
typedef std::integral_constant<AppenderType, APPENDER_DB>::type TypeIndex;
|
||||
static constexpr AppenderType type = APPENDER_DB;
|
||||
|
||||
AppenderDB(uint8 id, std::string const& name, LogLevel level, AppenderFlags flags, std::vector<char const*> extraArgs);
|
||||
~AppenderDB();
|
||||
|
||||
void setRealmId(uint32 realmId) override;
|
||||
AppenderType getType() const override { return TypeIndex::value; }
|
||||
AppenderType getType() const override { return type; }
|
||||
|
||||
private:
|
||||
uint32 realmId;
|
||||
|
||||
Reference in new issue
Block a user