Skip to content

rename SC_LOG macros#166

Open
markfoodyburton wants to merge 1 commit into
accellera-official:developfrom
markfoodyburton:mburton/sysc4
Open

rename SC_LOG macros#166
markfoodyburton wants to merge 1 commit into
accellera-official:developfrom
markfoodyburton:mburton/sysc4

Conversation

@markfoodyburton

Copy link
Copy Markdown
Contributor

sc_log: drop sc_log_level, drive macros off sc_verbosity, rename macro family

…o family

The merged sc_log proposal introduced a parallel scoped enum
(sc_core::sc_log_level) and a convenience-macro family that borrowed
SystemC's reserved vocabulary (SC_INFO/SC_DEBUG collide with sc_severity
and sc_verbosity enumerators; SC_TRACE is confusable with sc_trace()).

This change:

- Removes sc_log_level entirely. Logging levels are now sc_core::sc_verbosity
  values on a clean 100-step scale.
- Makes sc_verbosity int-backed (enum sc_verbosity : int) so SC_LOG_AT
  accepts any integer level with a well-defined conversion, and keeps
  SC_UNSET (= INT_MAX) as an internal "not-yet-resolved" sentinel rather
  than an enumerator in the standard enum.
- Renames the convenience macros to collision-free, significance-ordered
  names: SC_CRITICAL (SC_LOW), SC_ALERT (SC_MEDIUM), SC_NOTE (SC_HIGH),
  SC_DETAIL (SC_FULL), SC_INTERNAL (SC_DEBUG).
- Drops the level->text map from core; textual level names are an SCP
  convenience layered on top.
- Updates the dynamic-verbosity callback in sc_simcontext to sc_verbosity.
- Updates sc_log test01/test02 (local name maps) and regenerates goldens.

Signed-off-by: Mark Burton <mburton@qti.qualcomm.com>
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.

1 participant