Skip to content

Commit

Permalink
Enable logging when provider is initialized
Browse files Browse the repository at this point in the history
Currently, errors are not displayed when they ocurr as there is no
actual logger that has been included.

 * Add env_logger as the logging unit.
 * Initialize the logging unit when the provider is initialized.

Signed-off-by: Tomás González <[email protected]>
  • Loading branch information
tgonzalezorlandoarm committed Mar 5, 2024
1 parent 9e0b619 commit 987987c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions parsec-openssl-provider/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ log = "0.4"
parsec-client = { git = "https://github.com/parallaxsecond/parsec-client-rust", tag="0.16.0" }
parsec-openssl2 = { path = "../parsec-openssl2" }
openssl-errors = "0.2.0"
env_logger = "0.11.2"
2 changes: 2 additions & 0 deletions parsec-openssl-provider/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ pub unsafe fn parsec_provider_provider_init(
out: *mut *const OSSL_DISPATCH,
provctx: types::VOID_PTR_PTR,
) -> Result<(), parsec_openssl2::Error> {
env_logger::init();

let parsec_provider_teardown_ptr: ProviderTeardownPtr = parsec_provider_teardown;

let parsec_provider_gettable_params_ptr: ProviderGettableParamsPtr =
Expand Down

0 comments on commit 987987c

Please sign in to comment.