mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-08-04 12:58:41 +00:00
scoped log gathering; communicate ctrl logs -> user via events
This commit is contained in:
+17
-5
@@ -5,14 +5,21 @@
|
||||
#define BASE_LOG_H
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Log Type
|
||||
//~ rjf: Log Types
|
||||
|
||||
typedef struct LogScope LogScope;
|
||||
struct LogScope
|
||||
{
|
||||
LogScope *next;
|
||||
U64 pos;
|
||||
String8List strings;
|
||||
};
|
||||
|
||||
typedef struct Log Log;
|
||||
struct Log
|
||||
{
|
||||
Arena *arena;
|
||||
U64 log_buffer_start_pos;
|
||||
String8List log_buffer_strings;
|
||||
LogScope *top_scope;
|
||||
};
|
||||
|
||||
////////////////////////////////
|
||||
@@ -23,10 +30,15 @@ internal void log_release(Log *log);
|
||||
internal void log_select(Log *log);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Log Building/Clearing
|
||||
//~ rjf: Log Building
|
||||
|
||||
internal void log_msg(String8 string);
|
||||
internal void log_msgf(char *fmt, ...);
|
||||
internal void log_clear(void);
|
||||
|
||||
////////////////////////////////
|
||||
//~ rjf: Log Scopes
|
||||
|
||||
internal void log_scope_begin(void);
|
||||
internal String8 log_scope_end(Arena *arena);
|
||||
|
||||
#endif // BASE_LOG_H
|
||||
|
||||
Reference in New Issue
Block a user