원클릭으로
trace
Add opt_trace() calls for debugging and profiling. Use -t option to enable specific trace tiers and levels.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Add opt_trace() calls for debugging and profiling. Use -t option to enable specific trace tiers and levels.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Add unit tests for individual components. Use the GoogleTest (GTest) framework to define test cases and assertions. Troubleshooting test failures involves checking test logs, reproducing failures locally, and debugging with breakpoints or additional logging to identify root causes.
Validates function naming when adding new functions, refactoring existing functions, or reviewing function signatures.
Generate and refactor Neolith LPC code with correct driver semantics. Use when writing LPC functions, efun calls, simul_efun-aware code, inheritance calls, strict_types-safe code, inline LPC code (pre_text) in unit-tests, or when prompts mention ambiguity between local/simul/efun resolution. Prefer dot-call syntax receiver.method(args...) when explicit driver-efun intent is needed; dot-call lowers to efun::method(receiver, args...) and remains subject to efun type/arity validation.
Manage Neolith build-time options: add, change, or remove CMake options that control driver behavior and LPC visibility. Use when creating a new option, toggling an existing option default, renaming macros, tracing how an option surfaces to LPC code, or troubleshooting preprocessor define mismatches between cmake/options.cmake, lib/lpc/options.h.in, and the generated options.h.
Implement async worker thread patterns with bounded task queues, admission control, and completion posting. Use when adding blocking I/O operations (DNS, file I/O, network calls) that must not block the main event loop. Covers worker thread design, queue management, completion callbacks, and main-loop integration for event-driven architectures.
| name | trace |
| description | Add opt_trace() calls for debugging and profiling. Use -t option to enable specific trace tiers and levels. |
The opt_trace() macro provides printf-style debug logging with dynamic log levels and categories. The usage pattern is:
opt_trace(tier, "format string", ...);
tier is a bitflag defined in debug.h that specifies the trace category (e.g., TT_COMPILE, TT_MEMORY) of the log message and verbose level. The verbose level is an integer from 0 (least verbose) to 7 (most verbose) that specifies the importance of the log message. In the opt_trace() call, the tier is specified with the TT_ category bits combined with the verbose level in the lowest 3 bits. For example, TT_COMPILE|1 means a message in the compile category with verbose level 1.
The trace tier is compared against the trace flags specified at runtime via the -t option. If the tier matches the enabled flags and the message's verbose level is less than or equal to the enabled level, the message will be printed to the console.
The opt_trace() logging can be enabled with the -t option when running neolith. For example:
# Enables trace tier 020 at verbose level 1
./neolith -f neolith.conf -t 021
The trace flags are specified as an octal number, where the bits represent the categories and levels to enable. The lowest 3 bits specify the log level (0-7), while the higher bits specify the tiers. In this example, tier 020 corresponds to category TT_COMPILE, and level 1 means only messages with level 0 or 1 will be printed.
The trace tier -1 enables all categories and levels, while 0 disables all tracing.
opt_trace().