@pippocao/bqlog 2.2.9 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/bq/category_log.js +1 -1
- package/dist/cjs/bq/impl/log_invoker.js +1 -1
- package/dist/cjs/bq/log.js +7 -7
- package/dist/esm/bq/category_log.js +1 -1
- package/dist/esm/bq/impl/log_invoker.js +1 -1
- package/dist/esm/bq/log.js +7 -7
- package/package.json +2 -2
- package/prebuilds/darwin-arm64/BqLog.node +0 -0
- package/prebuilds/darwin-x64/BqLog.node +0 -0
- package/prebuilds/dragonfly-x64/BqLog.node +0 -0
- package/prebuilds/freebsd-arm64/BqLog.node +0 -0
- package/prebuilds/freebsd-x64/BqLog.node +0 -0
- package/prebuilds/linux-arm64/BqLog.node +0 -0
- package/prebuilds/linux-ia32/BqLog.node +0 -0
- package/prebuilds/linux-x64/BqLog.node +0 -0
- package/prebuilds/netbsd-arm64/BqLog.node +0 -0
- package/prebuilds/netbsd-x64/BqLog.node +0 -0
- package/prebuilds/openbsd-arm64/BqLog.node +0 -0
- package/prebuilds/openbsd-x64/BqLog.node +0 -0
- package/prebuilds/sunos-x64/BqLog.node +0 -0
- package/prebuilds/win32-arm64/BqLog.node +0 -0
- package/prebuilds/win32-arm64/BqLog.pdb +0 -0
- package/prebuilds/win32-x64/BqLog.node +0 -0
- package/prebuilds/win32-x64/BqLog.pdb +0 -0
|
@@ -46,7 +46,7 @@ class category_log extends log_1.log {
|
|
|
46
46
|
*/
|
|
47
47
|
static call_api_create_category_log(name, config, categories_count, categories) {
|
|
48
48
|
if (!config || config.length == 0) {
|
|
49
|
-
return
|
|
49
|
+
return BigInt(0);
|
|
50
50
|
}
|
|
51
51
|
let log_handle = log_invoker_1.log_invoker.__api_create_log(name, config, categories_count, categories);
|
|
52
52
|
return log_handle;
|
|
@@ -16,7 +16,7 @@ exports.log_invoker = void 0;
|
|
|
16
16
|
// For ESM build it is a copy of lib_loader.esm.txt,
|
|
17
17
|
// for CJS and OHOS build it is lib_loader.ts.
|
|
18
18
|
const lib_loader_1 = require("../utils/lib_loader");
|
|
19
|
-
function as_bigint(v, def =
|
|
19
|
+
function as_bigint(v, def = BigInt(0)) {
|
|
20
20
|
return typeof v === "bigint" ? v : def;
|
|
21
21
|
}
|
|
22
22
|
class log_invoker {
|
package/dist/cjs/bq/log.js
CHANGED
|
@@ -56,7 +56,7 @@ class log {
|
|
|
56
56
|
*/
|
|
57
57
|
static create_log(name, config) {
|
|
58
58
|
if (!config || config.length == 0) {
|
|
59
|
-
return new log(
|
|
59
|
+
return new log(BigInt(0));
|
|
60
60
|
}
|
|
61
61
|
let log_id = log_invoker_1.log_invoker.__api_create_log(name, config, 0, null);
|
|
62
62
|
return new log(log_id);
|
|
@@ -70,7 +70,7 @@ class log {
|
|
|
70
70
|
*/
|
|
71
71
|
static get_log_by_name(log_name) {
|
|
72
72
|
if (!log_name || log_name.length == 0) {
|
|
73
|
-
return new log(
|
|
73
|
+
return new log(BigInt(0));
|
|
74
74
|
}
|
|
75
75
|
let log_count = log_invoker_1.log_invoker.__api_get_logs_count();
|
|
76
76
|
for (let i = 0; i < log_count; ++i) {
|
|
@@ -80,14 +80,14 @@ class log {
|
|
|
80
80
|
return new log(id);
|
|
81
81
|
}
|
|
82
82
|
}
|
|
83
|
-
return new log(
|
|
83
|
+
return new log(BigInt(0));
|
|
84
84
|
}
|
|
85
85
|
/**
|
|
86
86
|
* Synchronously flush the buffer of all log objects
|
|
87
87
|
* to ensure that all data in the buffer is processed after the call.
|
|
88
88
|
*/
|
|
89
89
|
static force_flush_all_logs() {
|
|
90
|
-
log_invoker_1.log_invoker.__api_force_flush(
|
|
90
|
+
log_invoker_1.log_invoker.__api_force_flush(BigInt(0));
|
|
91
91
|
}
|
|
92
92
|
/**
|
|
93
93
|
* Register a callback that will be invoked whenever a console log message is output.
|
|
@@ -144,7 +144,7 @@ class log {
|
|
|
144
144
|
log_invoker_1.log_invoker.__api_log_device_console(level, str);
|
|
145
145
|
}
|
|
146
146
|
constructor(arg) {
|
|
147
|
-
this.log_id_ =
|
|
147
|
+
this.log_id_ = BigInt(0);
|
|
148
148
|
this.name_ = "";
|
|
149
149
|
this.categories_name_array_ = [];
|
|
150
150
|
if (arg instanceof log) {
|
|
@@ -163,7 +163,7 @@ class log {
|
|
|
163
163
|
this.log_id_ = arg;
|
|
164
164
|
let name = log_invoker_1.log_invoker.__api_get_log_name_by_id(this.log_id_);
|
|
165
165
|
if (!name) {
|
|
166
|
-
this.log_id_ =
|
|
166
|
+
this.log_id_ = BigInt(0);
|
|
167
167
|
return;
|
|
168
168
|
}
|
|
169
169
|
this.name_ = name;
|
|
@@ -213,7 +213,7 @@ class log {
|
|
|
213
213
|
* @return
|
|
214
214
|
*/
|
|
215
215
|
is_valid() {
|
|
216
|
-
return this.get_id() !=
|
|
216
|
+
return this.get_id() != BigInt(0);
|
|
217
217
|
}
|
|
218
218
|
/**
|
|
219
219
|
* Get the name of a log
|
|
@@ -43,7 +43,7 @@ export class category_log extends log {
|
|
|
43
43
|
*/
|
|
44
44
|
static call_api_create_category_log(name, config, categories_count, categories) {
|
|
45
45
|
if (!config || config.length == 0) {
|
|
46
|
-
return
|
|
46
|
+
return BigInt(0);
|
|
47
47
|
}
|
|
48
48
|
let log_handle = log_invoker.__api_create_log(name, config, categories_count, categories);
|
|
49
49
|
return log_handle;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
// For ESM build it is a copy of lib_loader.esm.txt,
|
|
14
14
|
// for CJS and OHOS build it is lib_loader.ts.
|
|
15
15
|
import { native_export } from "../utils/lib_loader.js";
|
|
16
|
-
function as_bigint(v, def =
|
|
16
|
+
function as_bigint(v, def = BigInt(0)) {
|
|
17
17
|
return typeof v === "bigint" ? v : def;
|
|
18
18
|
}
|
|
19
19
|
export class log_invoker {
|
package/dist/esm/bq/log.js
CHANGED
|
@@ -53,7 +53,7 @@ export class log {
|
|
|
53
53
|
*/
|
|
54
54
|
static create_log(name, config) {
|
|
55
55
|
if (!config || config.length == 0) {
|
|
56
|
-
return new log(
|
|
56
|
+
return new log(BigInt(0));
|
|
57
57
|
}
|
|
58
58
|
let log_id = log_invoker.__api_create_log(name, config, 0, null);
|
|
59
59
|
return new log(log_id);
|
|
@@ -67,7 +67,7 @@ export class log {
|
|
|
67
67
|
*/
|
|
68
68
|
static get_log_by_name(log_name) {
|
|
69
69
|
if (!log_name || log_name.length == 0) {
|
|
70
|
-
return new log(
|
|
70
|
+
return new log(BigInt(0));
|
|
71
71
|
}
|
|
72
72
|
let log_count = log_invoker.__api_get_logs_count();
|
|
73
73
|
for (let i = 0; i < log_count; ++i) {
|
|
@@ -77,14 +77,14 @@ export class log {
|
|
|
77
77
|
return new log(id);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
return new log(
|
|
80
|
+
return new log(BigInt(0));
|
|
81
81
|
}
|
|
82
82
|
/**
|
|
83
83
|
* Synchronously flush the buffer of all log objects
|
|
84
84
|
* to ensure that all data in the buffer is processed after the call.
|
|
85
85
|
*/
|
|
86
86
|
static force_flush_all_logs() {
|
|
87
|
-
log_invoker.__api_force_flush(
|
|
87
|
+
log_invoker.__api_force_flush(BigInt(0));
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
90
90
|
* Register a callback that will be invoked whenever a console log message is output.
|
|
@@ -141,7 +141,7 @@ export class log {
|
|
|
141
141
|
log_invoker.__api_log_device_console(level, str);
|
|
142
142
|
}
|
|
143
143
|
constructor(arg) {
|
|
144
|
-
this.log_id_ =
|
|
144
|
+
this.log_id_ = BigInt(0);
|
|
145
145
|
this.name_ = "";
|
|
146
146
|
this.categories_name_array_ = [];
|
|
147
147
|
if (arg instanceof log) {
|
|
@@ -160,7 +160,7 @@ export class log {
|
|
|
160
160
|
this.log_id_ = arg;
|
|
161
161
|
let name = log_invoker.__api_get_log_name_by_id(this.log_id_);
|
|
162
162
|
if (!name) {
|
|
163
|
-
this.log_id_ =
|
|
163
|
+
this.log_id_ = BigInt(0);
|
|
164
164
|
return;
|
|
165
165
|
}
|
|
166
166
|
this.name_ = name;
|
|
@@ -210,7 +210,7 @@ export class log {
|
|
|
210
210
|
* @return
|
|
211
211
|
*/
|
|
212
212
|
is_valid() {
|
|
213
|
-
return this.get_id() !=
|
|
213
|
+
return this.get_id() != BigInt(0);
|
|
214
214
|
}
|
|
215
215
|
/**
|
|
216
216
|
* Get the name of a log
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pippocao/bqlog",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.0",
|
|
4
4
|
"description": "High-performance cross-platform logging library for Node.js, with native C++ core. Supports sync/async modes, compressed file appenders, category logging, and more.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "pippocao",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"postpublish": "node -e \"try{require('fs').unlinkSync('README.md')}catch(e){}\""
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@types/node": "^22.19.
|
|
61
|
+
"@types/node": "^22.19.19",
|
|
62
62
|
"typescript": "^5.9.3"
|
|
63
63
|
},
|
|
64
64
|
"engines": {
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|