refactor: clean up log level system, use syslog constants directly#94
Merged
Conversation
Inquisitor-201
approved these changes
May 26, 2026
Inquisitor-201
left a comment
Contributor
There was a problem hiding this comment.
Logic verified, no regression.
Key checks:
- Comparison direction flip (level < L.level → level > L.level) is correct: syslog inverts severity numbering (7=DEBUG..0=EMERG)
- All 4 log_trace → log_debug callers captured
- log_level_string removal safe: no external references
- LOG_USE_COLOR removal correct: dead code with syslog()
- syslog.h moved from log.c to log.h — minor header hygiene concern (namespace pollution for log.h consumers) but not blocking for this codebase size.
LGTM.
Jaxtonmax
pushed a commit
to Jaxtonmax/hvisor-tool
that referenced
this pull request
Jun 9, 2026
…yswonder#94) * refactor: merge log_trace into log_debug * refactor: replace custom log levels with syslog constants * refactor: simplify Makefile log level handling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Remove the custom log level enum and
syslog_levels[]mapping layer.Macros now use syslog constants (
LOG_DEBUG,LOG_INFO,LOG_WARNING,LOG_ERR,LOG_CRIT) directly. Merge redundant log_trace into log_debug.Also drop the Makefile
ifeqchain, just pass$(LOG)directly to-DHLOG.