Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ advaith1 <advaithj1@gmail.com> (https://advaith.fun/)
Jonah Snider <me@jonahsnider.ninja> (https://jonahsnider.ninja/)
Matt Cowley <me@mattcowley.co.uk> (https://mattcowley.co.uk/)
Promise <me@promise.solutions> (https://promise.solutions/)
MeerBiene <meerbiene@protonmail.ch> (https://github.com/MeerBiene)
25 changes: 25 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,32 @@ blapi.handle(bot, apiKeys, 60);
blapi.manualPost(guildCount, botID, apiKeys[, shardID, shardCount[, shardsArray]]);
```


### Logging Options
```js
// Use this to get more detailed logging when posting
// Errors will always be logged
blapi.setLogging({
extended: true
});
```

```js
// If you have your own logger that you want to use pass it to BLAPI like so (the variable "log" in this example)
// !Important: The logger needs to export the following methods: log.info(), log.warn() and log.error()
blapi.setLogging({
extended: true,
logger: log
})
```
```js
// If you want to pass in only your custom logger but dont want extended logging to be enabled you would do:
blapi.setLogging({
logger: log
})
```
### Turn on extended logging
![](https://img.shields.io/badge/deprecated-Do%20not%20use%20this%20anymore-orange)

```js
// Use this to get more detailed logging when posting
Expand Down
134 changes: 2 additions & 132 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading