diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2022-07-30 14:18:53 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2022-07-30 14:18:53 +0200 |
| commit | 8bc9baefd688945327e2b01d257f656d622f33f1 (patch) | |
| tree | 4db1db5ca66c4b1a44f18d3e0770fe5d032b7382 /src/main.c | |
| parent | 0fe835e0871b42104218c9440f599d7a9e2b1f2f (diff) | |
| download | box64-8bc9baefd688945327e2b01d257f656d622f33f1.tar.gz box64-8bc9baefd688945327e2b01d257f656d622f33f1.zip | |
Added BOX64_ROLLING_LOG=1 for a 'Just in Time LOG=2' on signal
Diffstat (limited to 'src/main.c')
| -rwxr-xr-x | src/main.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c index 0f770db6..7baba053 100755 --- a/src/main.c +++ b/src/main.c @@ -62,6 +62,7 @@ int arm64_atomics = 0; int box64_dynarec = 0; #endif int dlsym_error = 0; +int cycle_log = 0; #ifdef HAVE_TRACE int trace_xmm = 0; int trace_emm = 0; @@ -351,6 +352,19 @@ void LoadLogEnv() if(!box64_nobanner) printf_log(LOG_INFO, "Debug level is %d\n", box64_log); } + p = getenv("BOX64_ROLLING_LOG"); + if(p) { + if(strlen(p)==1) { + if(p[0]>='0' && p[0]<='1') + cycle_log = p[0]-'0'; + } + if(cycle_log && box64_log>LOG_INFO) { + cycle_log = 0; + printf_log(LOG_NONE, "Incompatible Rolling log and Debug Log, disabling Rolling log\n"); + } + } + if(!box64_nobanner && cycle_log) + printf_log(LOG_INFO, "Rolling log, showing last %d function call on signals\n", CYCLE_LOG); p = getenv("BOX64_DUMP"); if(p) { if(strlen(p)==1) { |