JubeatPlus 3.9.11
Loading...
Searching...
No Matches
neDebugLog.h File Reference

Optional runtime diagnostics, emitting os_log lines tagged "JBPDBG". More...

#include <os/log.h>
#include <stdarg.h>
#include <stdio.h>
Include dependency graph for neDebugLog.h:

Go to the source code of this file.

Macros

#define NE_DBG_FIRST(limit)
 True for the first limit invocations at a given site.
#define NE_DBG_EVERY   (1)
 The uncapped counterpart of NE_DBG_FIRST.
#define NE_DBG(...)
 Wraps debug-only statements that have real side effects.
#define JBDBG_BUILD_SHA   "unknown"
 The build's git SHA, set by CMake at configure time.

Detailed Description

Optional runtime diagnostics, emitting os_log lines tagged "JBPDBG".

Capture them on device with idevicesyslog | grep JBPDBG.

Macro Definition Documentation

◆ JBDBG_BUILD_SHA

#define JBDBG_BUILD_SHA   "unknown"

The build's git SHA, set by CMake at configure time.

Logged once at startup under JBDBG so a captured os_log identifies exactly which build produced it.

◆ NE_DBG

#define NE_DBG ( ...)
Value:
do { \
__VA_ARGS__; \
} while (0)

Wraps debug-only statements that have real side effects.

Internal ; separates multiple statements; the macro supplies the trailing one. Use it for work that must not run in the faithful build, such as glGetError(), which clears GL error state.

◆ NE_DBG_EVERY

#define NE_DBG_EVERY   (1)

The uncapped counterpart of NE_DBG_FIRST.

For a diagnostic block on a rarely-taken path where the repetition itself is the evidence: a settings screen presented twice in a row logs both times, where NE_DBG_FIRST would silently drop the interesting one once its cap was reached. Never use it on a per-frame path.

◆ NE_DBG_FIRST

#define NE_DBG_FIRST ( limit)
Value:
__extension__({ \
static int _c = 0; \
_c < (limit) ? (++_c, 1) : 0; \
})

True for the first limit invocations at a given site.

A per-frame draw call can log a bounded burst instead of flooding the log at 60 fps. This is a statement expression rather than a lambda so that it compiles in the project's pure Objective-C (.m) translation units as well as the C++ ones.

Parameters
limitThe number of invocations to report true for.