Skip to content

Commit

Permalink
Merge branch 'main' into gx2f-system-struct
Browse files Browse the repository at this point in the history
  • Loading branch information
AJPfleger authored Nov 8, 2024
2 parents 5237f29 + 070d4a1 commit a44a24d
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion Core/src/Utilities/Logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,24 @@ class NeverFilterPolicy final : public OutputFilterPolicy {
}
};

class DummyPrintPolicy final : public OutputPrintPolicy {
public:
void flush(const Level& /*lvl*/, const std::string& /*input*/) override {}

const std::string& name() const override {
const static std::string s_name = "Dummy";
return s_name;
}

std::unique_ptr<OutputPrintPolicy> clone(
const std::string& /*name*/) const override {
return std::make_unique<DummyPrintPolicy>();
}
};

std::unique_ptr<const Logger> makeDummyLogger() {
using namespace Logging;
auto output = std::make_unique<DefaultPrintPolicy>(&std::cout);
auto output = std::make_unique<DummyPrintPolicy>();
auto print = std::make_unique<NeverFilterPolicy>();
return std::make_unique<const Logger>(std::move(output), std::move(print));
}
Expand Down

0 comments on commit a44a24d

Please sign in to comment.