AuroraRuntime/Source/Logging/AuFormatterContainer.cpp

26 lines
703 B
C++

/***
Copyright (C) 2022 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: AuFormatterContainer.cpp
Date: 2022-11-14
Author: Reece
***/
#include <RuntimeInternal.hpp>
#include "AuFormatterContainer.hpp"
namespace Aurora::Logging
{
AuSPtr<IFormatter> FormatterContainer::GetFormatter()
{
// extreme mitigation: prevent control block race conditions
AU_LOCK_GUARD(this->mutex);
return this->pFormatter;
}
void FormatterContainer::SetFormatter(const AuSPtr<IFormatter> &pFormatter)
{
// extreme mitigation: prevent control block race conditions
AU_LOCK_GUARD(this->mutex);
this->pFormatter = pFormatter;
}
}