Skip to content

fix(cef): map console severity using CEF ABI values - #654

Open
selmant wants to merge 1 commit into
andrewrabert:mainfrom
selmant:fix/cef-log-severity-abi
Open

fix(cef): map console severity using CEF ABI values#654
selmant wants to merge 1 commit into
andrewrabert:mainfrom
selmant:fix/cef-log-severity-abi

Conversation

@selmant

@selmant selmant commented Aug 2, 2026

Copy link
Copy Markdown

Summary

  • Map jfn_cef_set_log_severity integers to cef_log_severity_t with an explicit match instead of transmute on historical Chromium levels (-1..2).

  • Align app CEF filter constants with the same ABI values already used by console-message handling in client/events.rs.

  • Document the ABI table at the FFI and app constant sites:

    value severity
    0 DEFAULT
    1 VERBOSE
    2 INFO
    3 WARNING
    4 ERROR
    5 FATAL

Test plan

  • cargo clippy --manifest-path src/Cargo.toml -p jfn-cef -p jfn-rust -- -D warnings
  • Smoke: start with debug logging and confirm CEF/JS console lines land at expected levels

Align FFI and app log-severity constants with cef_log_severity_t so CEF
console filtering matches how browser events already interpret levels.
Document the ABI value table at both call sites.

Co-authored-by: Cursor <cursoragent@cursor.com>
@selmant
selmant force-pushed the fix/cef-log-severity-abi branch from d8ed83a to 5ded2c9 Compare August 2, 2026 15:18
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