30 lines
725 B
C++
30 lines
725 B
C++
/***
|
|
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: StdConsole.hpp
|
|
Date: 2022-2-5
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
#include "../AuFormatterContainer.hpp"
|
|
|
|
namespace Aurora::Logging::Sinks
|
|
{
|
|
struct ConsoleStdLogger : IFormattedSink
|
|
{
|
|
void OnMessageBlocking(AuUInt8 level, const ConsoleMessage &msg) override;
|
|
bool OnMessageNonblocking(AuUInt8 level, const ConsoleMessage &msg) override;
|
|
void OnFlush() override;
|
|
|
|
private:
|
|
//StringBuilder stringBuilder_;
|
|
|
|
ADD_FORMATTER_CONTAINER;
|
|
};
|
|
|
|
inline ConsoleStdLogger gStdConsoleSink;
|
|
|
|
IFormattedSink *NewStdSinkNew();
|
|
void NewStdSinkRelease(IFormattedSink *registry);
|
|
} |