Deprecate ILoggingAwareException
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 12 Oct 2021 13:47:56 +0000 (15:47 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 12 Oct 2021 13:53:34 +0000 (15:53 +0200)
The `finalizeLog()` method was initially added to support
com.woltlab.wcf.elasticSearch, as it logged the full - possibly huge -
Elasticsearch response, allowing it to log the response into a separate log
file.

This came with severe usability issues, as this log file is not readily
available from the ACP.

The Elasticsearch package was completely cleaned up, relying on the regular
Guzzle exceptions, and errors during JSON decoding no longer include the full
JSON.

Letting the Exception know that they've been logged is a layering violation
that will not play along nicely with #4342. The current method signature also
is pretty much limited to logging into files only.

Deprecate the interface, now that the only known user is gone.

wcfsetup/install/files/lib/core.functions.php
wcfsetup/install/files/lib/system/exception/ILoggingAwareException.class.php

index 55a95dc090d297c80e6412296f637ae1737e0dc0..e36842fc6f9ae0897849176de34f167de3bfce54 100644 (file)
@@ -246,6 +246,7 @@ namespace wcf\functions\exception {
                // let the Exception know it has been logged
                $prev = $e;
                do {
+                       /** @deprecated 5.5 The ILoggingAwareException interface and feature is deprecated. See the interface for details. */
                        if (
                                $prev instanceof ILoggingAwareException
                                || (method_exists($prev, 'finalizeLog') && is_callable([$prev, 'finalizeLog']))
index dc32ee2693ee48cc476f575c01a9d885020bb7a9..e26cc67af19568579977f0a53afb7529f43a759a 100644 (file)
@@ -3,13 +3,7 @@
 namespace wcf\system\exception;
 
 /**
- * Indicates that the exception should be let known if it was logged.
- *
- * @author      Tim Duesterhus
- * @copyright   2001-2021 WoltLab GmbH
- * @license     GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
- * @package     WoltLabSuite\Core\System\Exception
- * @since       5.4
+ * @deprecated 5.5 Either use 'IExtraInformationException' or include the necessary information within the message.
  */
 interface ILoggingAwareException extends \Throwable
 {