Skip to content

Commit

Permalink
add bcos-c-sdk version print when init (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
ywy2090 authored Sep 16, 2022
1 parent 22e01f5 commit e87c5ad
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions bcos-c-sdk/bcos_sdk_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,11 @@ void* bcos_sdk_create(struct bcos_sdk_c_config* config)
auto wsConfig = initWsConfig(config);
auto sdk = factory->buildSdk(wsConfig);
auto sdkPointer = sdk.release();

auto version = bcos_sdk_version();
BCOS_LOG(INFO) << LOG_BADGE("bcos_sdk_create") << LOG_DESC("[NEWOBJ]")
<< LOG_KV("sdk", sdkPointer);
<< LOG_KV("sdk", sdkPointer) << LOG_KV("version", version);
bcos_sdk_c_free((void*)version);
return sdkPointer;
}
catch (const std::exception& e)
Expand Down Expand Up @@ -166,8 +169,11 @@ void* bcos_sdk_create_by_config_file(const char* config_file)
auto factory = std::make_shared<bcos::cppsdk::SdkFactory>();
auto sdk = factory->buildSdk(config_file);
auto sdkPointer = sdk.release();
auto version = bcos_sdk_version();

BCOS_LOG(INFO) << LOG_BADGE("bcos_sdk_create_by_config_file") << LOG_DESC("[NEWOBJ]")
<< LOG_KV("sdk", sdkPointer);
<< LOG_KV("sdk", sdkPointer) << LOG_KV("version", version);
bcos_sdk_c_free((void*)version);
return sdkPointer;
}
catch (const std::exception& e)
Expand Down

0 comments on commit e87c5ad

Please sign in to comment.