mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2024-12-05 02:10:18 +00:00
Client new logger (#964)
This commit is contained in:
parent
ca76c10659
commit
6ebba3242d
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "fluence",
|
||||
"version": "0.7.53",
|
||||
"version": "0.7.54",
|
||||
"description": "the browser js-libp2p client for the Fluence network",
|
||||
"main": "./dist/fluence.js",
|
||||
"typings": "./dist/fluence.d.ts",
|
||||
|
File diff suppressed because one or more lines are too long
@ -62,7 +62,24 @@ export async function instantiateStepper(pid: PeerId): Promise<Stepper> {
|
||||
"host": { log_utf8_string: (level: any, target: any, offset: any, size: any) => {
|
||||
try {
|
||||
let str = getStringFromWasm0(wasm, offset, size)
|
||||
log.debug(str)
|
||||
|
||||
switch (level) {
|
||||
case 1:
|
||||
log.error(str)
|
||||
break;
|
||||
case 2:
|
||||
log.warn(str)
|
||||
break;
|
||||
case 3:
|
||||
log.info(str)
|
||||
break;
|
||||
case 4:
|
||||
log.debug(str)
|
||||
break;
|
||||
case 5:
|
||||
log.trace(str)
|
||||
break;
|
||||
}
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user