diff --git a/CHANGELOG.md b/CHANGELOG.md index 7cbf8e12f..08be677de 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,7 +19,7 @@ This version has also been known as `v5.2.0`, however, breaking changes caused t - With the update to gateway version 8, the `GUILD_MEMBER` and `PRESENCE_UPDATE` intents are not enabled by default. - You must first enable these in your Discord developer portal before enabling them in DiscordPHP. See the documentation for an example. - The `loadAllMembers` option requires the `GUILD_MEMBER` intent to be enabled. -- The `logging` and `httpLogger` options have been removed. +- The `logging`, `httpLogger` and `loggerLevel` options have been removed. - All HTTP logging information is now redirected to the `logger` that you have passed, or the default logger. - 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). - For voice client users, see the section below for breaking changes. diff --git a/V6_CONVERSION.md b/V6_CONVERSION.md index ec987c64d..4b560b0a6 100644 --- a/V6_CONVERSION.md +++ b/V6_CONVERSION.md @@ -6,7 +6,7 @@ PHP 7.4 is now required. Please update to _at least_ PHP 7.4, but we recommend P ## Options removal -The `logging` and `httpLogger` options have been removed. Any logs that went to the HTTP logger are now sent to the default `logger`. +The `logging`, `httpLogger` and `loggerLevel` options have been removed. Any logs that went to the HTTP logger are now sent to the default `logger`. If you were using the `logging` option to disable logging, you can do the same by creating a null logger: @@ -26,6 +26,23 @@ $discord = new Discord([ ]); ``` +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: + +```php +pushHandler(new StreamHandler('php://stdout'), Logger::DEBUG); // Change the second parameter of this function call. +$discord = new Discord([ + // ... + 'logger' => $logger, +]); +``` + ## Loading all members 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: - `stop()` - `close()` - `getRecieveStream()` -- Expect a voice client refactor in a future release. \ No newline at end of file +- Expect a voice client refactor in a future release.