Skip to content

Commit

Permalink
fix(c): init logger before running parser
Browse files Browse the repository at this point in the history
  • Loading branch information
prateekmedia committed Aug 25, 2024
1 parent 8eceabb commit fba63f5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 4 additions & 0 deletions src/ccextractor.c
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,10 @@ int main(int argc, char *argv[])
// If "ccextractor.cnf" is present, takes options from it.
// See docs/ccextractor.cnf.sample for more info.

#ifndef DISABLE_RUST
ccxr_init_basic_logger();
#endif

#ifndef DISABLE_RUST
int compile_ret = ccxr_parse_parameters(argc, argv);
#else
Expand Down
4 changes: 0 additions & 4 deletions src/lib_ccx/lib_ccx.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,6 @@ struct lib_ccx_ctx *init_libraries(struct ccx_s_options *opt)
ccx_common_logging.log_ftn = &mprint;
ccx_common_logging.gui_ftn = &activity_library_process;

#ifndef DISABLE_RUST
ccxr_init_basic_logger();
#endif

struct lib_ccx_ctx *ctx = malloc(sizeof(struct lib_ccx_ctx));
if (!ctx)
ccx_common_logging.fatal_ftn(EXIT_NOT_ENOUGH_MEMORY, "init_libraries: Not enough memory allocating lib_ccx_ctx context.");
Expand Down

0 comments on commit fba63f5

Please sign in to comment.