[PR #1622] [MERGED] [FEAT] Add log module in lib_ccxr #2334

Open
opened 2026-01-29 17:21:34 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/CCExtractor/ccextractor/pull/1622
Author: @IshanGrover2004
Created: 7/6/2024
Status: Merged
Merged: 7/16/2024
Merged by: @PunitLodha

Base: masterHead: migration-log-module


📝 Commits (10+)

  • 32d0097 chore: Add bitflags crate as dependency
  • b72d020 feat: Add function to initialize Rust logger using options in C
  • 537ceb5 feat: Add new module log
  • 9dd7d9b refactor: Add ccx_s_option into list of bindgen struct
  • 2ef9888 feat: Add Initialize logger function
  • 5447976 feat: All logging functions & macros
  • b93c49a chore: Fix clippy
  • 4774fdc docs: Mention in Changelogs
  • 3d4bc27 chore: format issue fix
  • 346741e fix: Remove activity_header from rust & use initially to print in C

📊 Changes

12 files changed (+655 additions, -13 deletions)

View changed files

📝 docs/CHANGES.TXT (+1 -0)
📝 src/lib_ccx/activity.c (+3 -8)
📝 src/lib_ccx/lib_ccx.c (+6 -0)
📝 src/lib_ccx/lib_ccx.h (+4 -0)
📝 src/lib_ccx/utility.c (+0 -1)
📝 src/rust/Cargo.lock (+7 -4)
📝 src/rust/build.rs (+1 -0)
📝 src/rust/lib_ccxr/Cargo.lock (+9 -0)
📝 src/rust/lib_ccxr/Cargo.toml (+1 -0)
src/rust/lib_ccxr/src/util/log.rs (+572 -0)
📝 src/rust/lib_ccxr/src/util/mod.rs (+2 -0)
📝 src/rust/src/libccxr_exports/mod.rs (+49 -0)

📄 Description

In raising this pull request, I confirm the following (please check boxes):

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.
  • I have mentioned this change in the changelog.

My familiarity with the project is as follows (check one):

  • I have never used CCExtractor.
  • I have used CCExtractor just a couple of times.
  • I absolutely love CCExtractor, but have not contributed previously.
  • I am an active contributor to CCExtractor.

Closes #1553

This PR adds functions and macros used for logging operations. The functions of this PR have not been integrated into the C codebase since there is no safe or easy way to pass variable number of arguments (as used in printf) from C to Rust. But the code for initializing the logger from C to Rust is included.

After this PR merge, anybody can use macros like info!, fata!, error!, debug! (Just like mprint, fatal, etc in C) for logging purposes after initializing logger using ccxr_init_basic_logger


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/CCExtractor/ccextractor/pull/1622 **Author:** [@IshanGrover2004](https://github.com/IshanGrover2004) **Created:** 7/6/2024 **Status:** ✅ Merged **Merged:** 7/16/2024 **Merged by:** [@PunitLodha](https://github.com/PunitLodha) **Base:** `master` ← **Head:** `migration-log-module` --- ### 📝 Commits (10+) - [`32d0097`](https://github.com/CCExtractor/ccextractor/commit/32d00971a6a1dff2a8833e7d64b44aefbcc4f6de) chore: Add bitflags crate as dependency - [`b72d020`](https://github.com/CCExtractor/ccextractor/commit/b72d0201fe5a82cd96ac2d54abeedb3f1a91316d) feat: Add function to initialize Rust logger using options in C - [`537ceb5`](https://github.com/CCExtractor/ccextractor/commit/537ceb5499221e83df791b577f3429bb37e57d83) feat: Add new module `log` - [`9dd7d9b`](https://github.com/CCExtractor/ccextractor/commit/9dd7d9b68b6f9d8152751fe204e70372905c2633) refactor: Add ccx_s_option into list of bindgen struct - [`2ef9888`](https://github.com/CCExtractor/ccextractor/commit/2ef9888ffb5d2229fb4ec0fafec3accad60531c3) feat: Add Initialize logger function - [`5447976`](https://github.com/CCExtractor/ccextractor/commit/544797608efe43b7297fc4efbf91a05de5f0bf22) feat: All logging functions & macros - [`b93c49a`](https://github.com/CCExtractor/ccextractor/commit/b93c49a959493007ec133dec2a441f6e2a024b41) chore: Fix clippy - [`4774fdc`](https://github.com/CCExtractor/ccextractor/commit/4774fdc4c1a9b4b03cbb4cde3eda849d8ebb0fed) docs: Mention in Changelogs - [`3d4bc27`](https://github.com/CCExtractor/ccextractor/commit/3d4bc27bbae72f325231bedf3e049741733737ce) chore: format issue fix - [`346741e`](https://github.com/CCExtractor/ccextractor/commit/346741e23be004eccb9d00ac2795affff303525e) fix: Remove activity_header from rust & use initially to print in C ### 📊 Changes **12 files changed** (+655 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `docs/CHANGES.TXT` (+1 -0) 📝 `src/lib_ccx/activity.c` (+3 -8) 📝 `src/lib_ccx/lib_ccx.c` (+6 -0) 📝 `src/lib_ccx/lib_ccx.h` (+4 -0) 📝 `src/lib_ccx/utility.c` (+0 -1) 📝 `src/rust/Cargo.lock` (+7 -4) 📝 `src/rust/build.rs` (+1 -0) 📝 `src/rust/lib_ccxr/Cargo.lock` (+9 -0) 📝 `src/rust/lib_ccxr/Cargo.toml` (+1 -0) ➕ `src/rust/lib_ccxr/src/util/log.rs` (+572 -0) 📝 `src/rust/lib_ccxr/src/util/mod.rs` (+2 -0) 📝 `src/rust/src/libccxr_exports/mod.rs` (+49 -0) </details> ### 📄 Description **In raising this pull request, I confirm the following (please check boxes):** - [x] I have read and understood the [contributors guide](https://github.com/CCExtractor/ccextractor/blob/master/.github/CONTRIBUTING.md). - [x] I have checked that another pull request for this purpose does not exist. - [x] I have considered, and confirmed that this submission will be valuable to others. - [x] I accept that this submission may not be used, and the pull request closed at the will of the maintainer. - [x] I give this submission freely, and claim no ownership to its content. - [x] **I have mentioned this change in the [changelog](https://github.com/CCExtractor/ccextractor/blob/master/docs/CHANGES.TXT).** **My familiarity with the project is as follows (check one):** - [ ] I have never used CCExtractor. - [ ] I have used CCExtractor just a couple of times. - [ ] I absolutely love CCExtractor, but have not contributed previously. - [x] I am an active contributor to CCExtractor. --- Closes #1553 This PR adds functions and macros used for logging operations. The functions of this PR have not been integrated into the C codebase since there is no safe or easy way to pass variable number of arguments (as used in printf) from C to Rust. But the code for initializing the logger from C to Rust is included. After this PR merge, anybody can use macros like `info!`, `fata!`, `error!`, `debug!` (Just like `mprint`, `fatal`, etc in C) for logging purposes after initializing logger using `ccxr_init_basic_logger` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 17:21:34 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#2334