chore(): readme update
This commit is contained in:
@@ -510,7 +510,7 @@ Important: do not subscribe to the same topics on both clients or you will recei
|
|||||||
|
|
||||||
### Customise logging
|
### Customise logging
|
||||||
|
|
||||||
Pass a custom logger (or mutate the imported DefaultLogger class) which supports the log methods `silly`, `debug`, `notice`, `info`, `warning` and `error`, or override methods from the default logger as desired, as in the example below:
|
Pass a custom logger (or mutate the imported DefaultLogger class) which supports the log methods `trace`, `info` and `error`, or override methods from the default logger as desired, as in the example below:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
const { WebsocketClient, DefaultLogger } = require('bybit-api');
|
const { WebsocketClient, DefaultLogger } = require('bybit-api');
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ const restClient = new RestClientV5({
|
|||||||
demoTrading: true,
|
demoTrading: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
// Optional, uncomment the "silly" override to log a lot more info about what the WS client is doing
|
// Optional, uncomment the "trace" override to log a lot more info about what the WS client is doing
|
||||||
const customLogger = {
|
const customLogger = {
|
||||||
...DefaultLogger,
|
...DefaultLogger,
|
||||||
// trace: (...params) => console.log('trace', ...params),
|
// trace: (...params) => console.log('trace', ...params),
|
||||||
|
|||||||
Reference in New Issue
Block a user