Skip to content

refactor: clean up log level system, use syslog constants directly#94

Merged
Inquisitor-201 merged 3 commits into
syswonder:mainfrom
agicy:feat/log-level
May 26, 2026
Merged

refactor: clean up log level system, use syslog constants directly#94
Inquisitor-201 merged 3 commits into
syswonder:mainfrom
agicy:feat/log-level

Conversation

@agicy

@agicy agicy commented May 26, 2026

Copy link
Copy Markdown
Contributor

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 ifeq chain, just pass $(LOG) directly to -DHLOG.

Inquisitor-201

This comment was marked as duplicate.

@Inquisitor-201 Inquisitor-201 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@Inquisitor-201 Inquisitor-201 merged commit b17d9dd into syswonder:main May 26, 2026
1 check passed
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants