aboutsummaryrefslogtreecommitdiff
path: root/core/log
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2025-08-08 12:10:01 +0100
committergingerBill <gingerBill@users.noreply.github.com>2025-08-08 12:10:01 +0100
commit7642e0a0e0bb0ff79da6ac7a2ba3b787afa32b78 (patch)
treeaec4baaf441f58b3c6c9a8a55c61e5f8c6218f4b /core/log
parent3194fda8f3b01affc086eec4102d924277fe9f43 (diff)
Require `@(init)` and `@(fini)` to be `proc "contextless" ()`
Diffstat (limited to 'core/log')
-rw-r--r--core/log/file_console_logger.odin4
1 files changed, 3 insertions, 1 deletions
diff --git a/core/log/file_console_logger.odin b/core/log/file_console_logger.odin
index 0fe5c3477..f0acc8a22 100644
--- a/core/log/file_console_logger.odin
+++ b/core/log/file_console_logger.odin
@@ -43,12 +43,14 @@ File_Console_Logger_Data :: struct {
@(private) global_subtract_stderr_options: Options
@(init, private)
-init_standard_stream_status :: proc() {
+init_standard_stream_status :: proc "contextless" () {
// NOTE(Feoramund): While it is technically possible for these streams to
// be redirected during the runtime of the program, the cost of checking on
// every single log message is not worth it to support such an
// uncommonly-used feature.
if terminal.color_enabled {
+ context = runtime.default_context()
+
// This is done this way because it's possible that only one of these
// streams could be redirected to a file.
if !terminal.is_terminal(os.stdout) {