[Open Screen] Adds a unit test for logging macros.
- Adds unit tests for the macros defined in util/osp_logging.h
- Adds testing hooks to logging_posix.h
Tests both behavior in _DEBUG and !_DEBUG builds.
Change-Id: I5fa3382d5455fbdf5e5b75d0d519cd43c5960d12
Reviewed-on: https://chromium-review.googlesource.com/c/openscreen/+/2289036
Commit-Queue: mark a. foltz <mfoltz@chromium.org>
Reviewed-by: Brandon Tolsch <btolsch@chromium.org>
diff --git a/platform/impl/logging.h b/platform/impl/logging.h
index 236b528..8424019 100644
--- a/platform/impl/logging.h
+++ b/platform/impl/logging.h
@@ -9,7 +9,7 @@
namespace openscreen {
-// Direct all logging output to a named FIFO having the given |filename|. If the
+// Append logging output to a named FIFO having the given |filename|. If the
// file does not exist, an attempt is made to auto-create it. If unsuccessful,
// abort the program. If this is never called, logging continues to output to
// the default destination (stderr).
@@ -19,6 +19,9 @@
// default.
void SetLogLevel(LogLevel level);
+// Returns the current global logging level.
+LogLevel GetLogLevel();
+
} // namespace openscreen
#endif // PLATFORM_IMPL_LOGGING_H_