Added Logger constructors to write output to arbitrary streams.
This commit is contained in:
parent
8a587eb57a
commit
eff3b45089
@ -21,7 +21,9 @@ namespace output
|
||||
class Logger
|
||||
{
|
||||
public:
|
||||
Logger();
|
||||
explicit Logger();
|
||||
explicit Logger(ColorStream &&outputStream);
|
||||
explicit Logger(ColorStream &&outputStream, ColorStream &&errorStream);
|
||||
|
||||
ColorStream &outputStream();
|
||||
ColorStream &errorStream();
|
||||
|
@ -60,8 +60,22 @@ constexpr const Format LocationFormat = {Color::White, FontWeight::Bold};
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Logger::Logger()
|
||||
: m_outputStream{std::cout},
|
||||
m_errorStream{std::cerr},
|
||||
: Logger(std::cout, std::cerr)
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Logger::Logger(ColorStream &&outputStream)
|
||||
: Logger(std::forward<ColorStream &&>(outputStream), std::cerr)
|
||||
{
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Logger::Logger(ColorStream &&outputStream, ColorStream &&errorStream)
|
||||
: m_outputStream{outputStream},
|
||||
m_errorStream{errorStream},
|
||||
m_outputPriority{Priority::Warning}
|
||||
{
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user