35 class NeverFilterPolicy final :
public OutputFilterPolicy {
37 ~NeverFilterPolicy()
override =
default;
39 bool doPrint(
const Level& )
const override {
return false; }
42 std::unique_ptr<const Logger> makeDummyLogger() {
43 using namespace Logging;
44 auto output = std::make_unique<DefaultPrintPolicy>(&std::cout);
45 auto print = std::make_unique<NeverFilterPolicy>();
46 return std::make_unique<const Logger>(std::move(output), std::move(
print));
49 std::unique_ptr<const Logger> s_dummyLogger{makeDummyLogger()};
50 LoggerWrapper s_dummyLoggerWrapper{*s_dummyLogger};
57 std::ostream* log_stream) {
58 using namespace Logging;
59 auto output = std::make_unique<LevelOutputDecorator>(
60 std::make_unique<NamedOutputDecorator>(
61 std::make_unique<TimedOutputDecorator>(
62 std::make_unique<DefaultPrintPolicy>(log_stream)),
64 auto print = std::make_unique<DefaultFilterPolicy>(lvl);
65 return std::make_unique<const Logger>(std::move(output), std::move(
print));
69 return Logging::s_dummyLoggerWrapper;