Skip to content

Commit c11af7c

Browse files
committedApr 22, 2021
Added loggerLevel to changelog
1 parent 4622773 commit c11af7c

File tree

2 files changed

+20
-3
lines changed

2 files changed

+20
-3
lines changed
 

‎CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ This version has also been known as `v5.2.0`, however, breaking changes caused t
1919
- With the update to gateway version 8, the `GUILD_MEMBER` and `PRESENCE_UPDATE` intents are not enabled by default.
2020
- You must first enable these in your Discord developer portal before enabling them in DiscordPHP. See the documentation for an example.
2121
- The `loadAllMembers` option requires the `GUILD_MEMBER` intent to be enabled.
22-
- The `logging` and `httpLogger` options have been removed.
22+
- The `logging`, `httpLogger` and `loggerLevel` options have been removed.
2323
- All HTTP logging information is now redirected to the `logger` that you have passed, or the default logger.
2424
- For people that disabled logging by setting `logging` to false, you can create a logger with a [`NullHandler`](https://github.com/Seldaek/monolog/blob/main/src/Monolog/Handler/NullHandler.php).
2525
- For voice client users, see the section below for breaking changes.

‎V6_CONVERSION.md

+19-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PHP 7.4 is now required. Please update to _at least_ PHP 7.4, but we recommend P
66

77
## Options removal
88

9-
The `logging` and `httpLogger` options have been removed. Any logs that went to the HTTP logger are now sent to the default `logger`.
9+
The `logging`, `httpLogger` and `loggerLevel` options have been removed. Any logs that went to the HTTP logger are now sent to the default `logger`.
1010

1111
If you were using the `logging` option to disable logging, you can do the same by creating a null logger:
1212

@@ -26,6 +26,23 @@ $discord = new Discord([
2626
]);
2727
```
2828

29+
If you were using the `loggerLevel` option to change the logger level, you can do the same by creating a logger and changing the level of the handler:
30+
31+
```php
32+
<?php
33+
34+
use Discord\Discord;
35+
use Monolog\Logger;
36+
use Monolog\Handler\StreamHandler;
37+
38+
$logger = new Logger('Logger');
39+
$logger->pushHandler(new StreamHandler('php://stdout'), Logger::DEBUG); // Change the second parameter of this function call.
40+
$discord = new Discord([
41+
// ...
42+
'logger' => $logger,
43+
]);
44+
```
45+
2946
## Loading all members
3047

3148
Alongside the `loadAllMembers` option, you now must enable the `GUILD_MEMBERS` intent. You can do this by specifying the `intents` option in the options array:
@@ -90,4 +107,4 @@ Copied from the changelog:
90107
- `stop()`
91108
- `close()`
92109
- `getRecieveStream()`
93-
- Expect a voice client refactor in a future release.
110+
- Expect a voice client refactor in a future release.

0 commit comments

Comments
 (0)
Please sign in to comment.