diff options
| author | Feoramund <161657516+Feoramund@users.noreply.github.com> | 2024-06-15 11:18:40 -0400 |
|---|---|---|
| committer | Feoramund <161657516+Feoramund@users.noreply.github.com> | 2024-06-15 11:18:40 -0400 |
| commit | 753516c3926766c51e78f8ff8933a4bef29affff (patch) | |
| tree | 75f99c65d93b93ecf20332c4f3f6d35f595497f0 /core/testing/logging.odin | |
| parent | 1c940e3968a210ba0f06d663c54d8135790e27c1 (diff) | |
Add `ODIN_TEST_SHORT_LOGS` define
Strips out the procedure, date, and time information, for when you just
need to know the file, line, and message.
Diffstat (limited to 'core/testing/logging.odin')
| -rw-r--r-- | core/testing/logging.odin | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/core/testing/logging.odin b/core/testing/logging.odin index 5bbbffeae..f1e75d33c 100644 --- a/core/testing/logging.odin +++ b/core/testing/logging.odin @@ -8,13 +8,22 @@ import "core:strings" import "core:sync/chan" import "core:time" -Default_Test_Logger_Opts :: runtime.Logger_Options { - .Level, - .Terminal_Color, - .Short_File_Path, - .Line, - .Procedure, - .Date, .Time, +when USING_SHORT_LOGS { + Default_Test_Logger_Opts :: runtime.Logger_Options { + .Level, + .Terminal_Color, + .Short_File_Path, + .Line, + } +} else { + Default_Test_Logger_Opts :: runtime.Logger_Options { + .Level, + .Terminal_Color, + .Short_File_Path, + .Line, + .Procedure, + .Date, .Time, + } } Log_Message :: struct { |