Class InternalErrorSettings

    • Field Detail

      • DEFAULT_ENABLE_FULL_THREAD_DUMPS

        public static final boolean DEFAULT_ENABLE_FULL_THREAD_DUMPS
        See Also:
        Constant Field Values
      • DEFAULT_SEND_EMAIL

        public static final boolean DEFAULT_SEND_EMAIL
        By default each internal error is also stored as XML.
        Since:
        8.2.2
        See Also:
        Constant Field Values
      • DEFAULT_SAVE_AS_XML

        public static final boolean DEFAULT_SAVE_AS_XML
        By default each internal error is also stored as XML.
        Since:
        8.2.2
        See Also:
        Constant Field Values
    • Method Detail

      • setSMTPSettings

        public static void setSMTPSettings​(@Nullable
                                           com.helger.smtp.settings.ISMTPSettings aSMTPSettings)
      • getSMTPSettings

        @Nullable
        public static com.helger.smtp.settings.ISMTPSettings getSMTPSettings()
      • setSMTPSenderAddress

        public static void setSMTPSenderAddress​(@Nullable
                                                com.helger.commons.email.IEmailAddress aSenderAddress)
      • getSMTPSenderAddress

        @Nullable
        public static com.helger.commons.email.IEmailAddress getSMTPSenderAddress()
      • setSMTPReceiverAddress

        public static void setSMTPReceiverAddress​(@Nullable
                                                  com.helger.commons.email.IEmailAddress aReceiverAddress)
      • setSMTPReceiverAddresses

        public static void setSMTPReceiverAddresses​(@Nullable
                                                    Iterable<? extends com.helger.commons.email.IEmailAddress> aReceiverAddresses)
      • setSMTPReceiverAddresses

        public static void setSMTPReceiverAddresses​(@Nullable
                                                    com.helger.commons.email.IEmailAddress... aReceiverAddresses)
      • getSMTPReceiverAddresses

        @Nonnull
        @ReturnsMutableCopy
        public static com.helger.commons.collection.impl.ICommonsList<com.helger.commons.email.IEmailAddress> getSMTPReceiverAddresses()
      • setDumpAllThreads

        public static void setDumpAllThreads​(boolean bEnableDumpAllThreads)
        Enable the creation of a dump of all threads. Warning: this takes a lot of CPU, so enable this only when you are not running a performance critical application! The default is false.
        Parameters:
        bEnableDumpAllThreads - true to enabled, false to disable.
      • isDumpAllThreads

        public static boolean isDumpAllThreads()
        Returns:
        true to dump all threads on internal error, false to not do it.
      • setSendEmail

        public static void setSendEmail​(boolean bSendEmail)
        Send an email when an internal error occurs? Sending happens only if configuration is available.
        Parameters:
        bSendEmail - true to send, false to not send
      • isSendEmail

        public static boolean isSendEmail()
        Returns:
        true to send an email on an internal error, false to not do it.
      • setSaveAsXML

        public static void setSaveAsXML​(boolean bSaveAsXML)
        Save an internal error as XML?
        Parameters:
        bSaveAsXML - true to save as XML, false to not save
      • isSaveAsXML

        public static boolean isSaveAsXML()
        Returns:
        true to save internal error as XML, false to not do it.
      • setFallbackLocale

        public static void setFallbackLocale​(@Nonnull
                                             Locale aFallbackLocale)
        Set the fallback locale in case none could be determined.
        Parameters:
        aFallbackLocale - Locale to use. May not be null.
        Since:
        7.0.4
      • getFallbackLocale

        @Nonnull
        public static Locale getFallbackLocale()
        Returns:
        The fallback locale to use. Never null.
        Since:
        7.0.4
      • callbacks

        @Nonnull
        @ReturnsMutableObject
        public static com.helger.commons.callback.CallbackList<IInternalErrorCallback> callbacks()
        Returns:
        The current custom internal error callbacks. Never null.
      • setStorageFileProvider

        public static void setStorageFileProvider​(@Nonnull
                                                  Function<InternalErrorMetadata,​File> aStorageFileProvider)
        Set the provider that defines how to build the filename to save internal error files.
        Parameters:
        aStorageFileProvider - Storage provider. May not be null
        Since:
        8.0.3
      • setDefaultStorageFileProvider

        public static void setDefaultStorageFileProvider()
        Set the default storage file provider. In case you played around and want to restore the default behavior.
        Since:
        8.0.3
        See Also:
        setStorageFileProvider(Function)
      • setDefaultStorageFileProviderUpTo802

        public static void setDefaultStorageFileProviderUpTo802()
        Set the storage file provider to the default before v8.0.3. The difference to setDefaultStorageFileProvider() is, that this version does not contain a "month" subfolder.
        Since:
        8.0.3
        See Also:
        setStorageFileProvider(Function)