From 68dd09d561faffa38cede37b0916872ff013b6a3 Mon Sep 17 00:00:00 2001 From: Madeline Busig Date: Wed, 19 Jun 2024 19:32:46 -0600 Subject: [PATCH] Add additional documentation for log --- include/mtl/log.hpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/include/mtl/log.hpp b/include/mtl/log.hpp index 97c1fc3..213e3b3 100644 --- a/include/mtl/log.hpp +++ b/include/mtl/log.hpp @@ -24,18 +24,23 @@ constexpr char endl_char = '\n'; /** * \brief Log stream * - * String stream that overrides sync() to flush the stream to the correct + * String stream that overrides flush() to flush the stream to the correct * output depending on the platform. Each flush is treated as a separate message. - * The capacity of the stream depends on the platform. + * + * Different streams may share a buffer, so writing to a different stream + * without flushing the previous may cause strange behaviour. + * + * The capacity of the stream depends on the platform, but will always be at + * least 255 characters. * * See mtl::basic_string_stream for information on when the stream is flushed. * * Platform specific info: * * GBA: Flushing cannot be done without printing to a new line. Trying to - * insert a newline will instead just flush the stream onto a new line. On MGBA - * this also starts the line with "GBA Debug: ", so the line is not completely - * blank. + * flush without using mtl::endl will still flush the stream onto a new line. + * On MGBA this also starts the line with "GBA Debug: ",so the line is not + * completely blank either. */ class stream : public basic_string_stream { private: