Skip to content

Commit 09236fb

Browse files
Tonlib: add exported function tonlib_client_set_verbosity_level (#406)
Co-authored-by: ms <[email protected]> Co-authored-by: dungeon-master-666 <[email protected]>
1 parent 8537dd6 commit 09236fb

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

tonlib/tonlib/tonlib_client_json.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222

2323
#include "td/utils/Slice.h"
2424

25+
#include "tonlib/Logging.h"
26+
2527
extern "C" int tonlib_client_json_square(int x, const char *str) {
2628
return x * x;
2729
}
@@ -30,6 +32,10 @@ void *tonlib_client_json_create() {
3032
return new tonlib::ClientJson();
3133
}
3234

35+
void tonlib_client_set_verbosity_level(int verbosity_level) {
36+
tonlib::Logging::set_verbosity_level(verbosity_level);
37+
}
38+
3339
void tonlib_client_json_destroy(void *client) {
3440
delete static_cast<tonlib::ClientJson *>(client);
3541
}

tonlib/tonlib/tonlib_client_json.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ extern "C" {
2626

2727
TONLIBJSON_EXPORT void *tonlib_client_json_create();
2828

29+
TONLIBJSON_EXPORT void tonlib_client_set_verbosity_level(int verbosity_level);
30+
2931
TONLIBJSON_EXPORT void tonlib_client_json_send(void *client, const char *request);
3032

3133
TONLIBJSON_EXPORT const char *tonlib_client_json_receive(void *client, double timeout);

tonlib/tonlibclientjson_export_list

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ _tonlib_client_json_destroy
33
_tonlib_client_json_send
44
_tonlib_client_json_receive
55
_tonlib_client_json_execute
6+
_tonlib_client_set_verbosity_level

0 commit comments

Comments
 (0)