diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-30 20:31:18 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-10-30 20:31:18 +0100 |
commit | d8daa3e045ca2f41edcbed533bc5a9fef1363a17 (patch) | |
tree | 6a4c0883d05607476b609e68bcac7d854e281aea /backend/print.h | |
parent | 6e1d62955c7a7f39bc9126d709a42a70e02a1d30 (diff) |
print to backend
Diffstat (limited to 'backend/print.h')
-rw-r--r-- | backend/print.h | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/backend/print.h b/backend/print.h new file mode 100644 index 0000000..8fa0501 --- /dev/null +++ b/backend/print.h @@ -0,0 +1,26 @@ +#pragma once + +#include <stdio.h> + +#include "String.h" + +void lprtf(const char * fmt, ...); + +class SessionLog { +public: + static SessionLog & get(); + +private: + SessionLog(); + virtual ~SessionLog(); + +public: + virtual void append(const String & str) const; + virtual void append(const char * str) const; + virtual void append(const char * buf, size_t buf_size) const; + +private: + FILE * file = nullptr; + static constexpr const bool enable = false; +}; + |