expand base layer logging mechanism with bucketing info; make one bucket for passive log collection, another for user-facing errors; always consume user errors at the top-level and display; use user-error mechanism to communicate bad 32-bit app launches from demon

This commit is contained in:
Ryan Fleury
2024-05-14 08:10:02 -07:00
parent 6c200a59cd
commit 3085482e34
7 changed files with 104 additions and 61 deletions
+8 -2
View File
@@ -378,8 +378,14 @@ update_and_render(OS_Handle repaint_window_handle, void *user_data)
//- rjf: end logging
//
{
String8 log = log_scope_end(scratch.arena);
os_append_data_to_file_path(main_thread_log_path, log);
LogScopeResult log = log_scope_end(scratch.arena);
os_append_data_to_file_path(main_thread_log_path, log.strings[LogMsgKind_Info]);
if(log.strings[LogMsgKind_UserError].size != 0)
{
DF_CmdParams p = df_cmd_params_from_gfx();
p.string = log.strings[LogMsgKind_UserError];
df_push_cmd__root(&p, df_cmd_spec_from_core_cmd_kind(DF_CoreCmdKind_Error));
}
}
scratch_end(scratch);