stream_creator.h 791 B

12345678910111213141516171819202122232425262728
  1. #pragma once
  2. #include "backend_creator.h"
  3. class TCerrLogBackendCreator : public TLogBackendCreatorBase {
  4. public:
  5. TCerrLogBackendCreator();
  6. static TFactory::TRegistrator<TCerrLogBackendCreator> RegistrarCerr;
  7. static TFactory::TRegistrator<TCerrLogBackendCreator> RegistrarConsole;
  8. protected:
  9. virtual void DoToJson(NJson::TJsonValue& value) const override;
  10. private:
  11. virtual THolder<TLogBackend> DoCreateLogBackend() const override;
  12. };
  13. class TCoutLogBackendCreator : public TLogBackendCreatorBase {
  14. public:
  15. TCoutLogBackendCreator();
  16. static TFactory::TRegistrator<TCoutLogBackendCreator> Registrar;
  17. protected:
  18. virtual void DoToJson(NJson::TJsonValue& value) const override;
  19. private:
  20. virtual THolder<TLogBackend> DoCreateLogBackend() const override;
  21. };