Logger.h 661 B

1234567891011121314151617181920212223
  1. #pragma once
  2. // Helper for writing formatted text to the console output.
  3. class Logger
  4. {
  5. public:
  6. Logger();
  7. void Indent() { indentation++; }
  8. void Unindent() { indentation--; }
  9. void Write(_In_z_ _Printf_format_string_ char const* format, ...);
  10. void WriteLine(_In_z_ _Printf_format_string_ char const* format, ...);
  11. void WriteBytes(_In_z_ char const* name, vector<uint8_t> const& bytes);
  12. void WriteEnum(_In_z_ char const* name, int32_t value, _In_z_ _Deref_pre_z_ char const* const* enumValues);
  13. private:
  14. void Write(_In_z_ _Printf_format_string_ char const* format, va_list args);
  15. int indentation;
  16. bool isNewLine;
  17. };