Interface PropertiesLoader

  • All Known Implementing Classes:
    DefaultPropertiesLoader

    public interface PropertiesLoader
    Properties Loader Interface.
    Author:
    pedrotoliveira
    • Method Detail

      • getRootLevel

        org.apache.logging.log4j.Level getRootLevel()
        Get Root Log Level It can be: ALL TRACE DEBUG INFO WARN ERROR FATAL OF - Custom log levels will be disabled at this project moment.
        Returns:
        an Event Level.
        See Also:
        log4j/2.0/manual/architecture.html
      • isConsoleEnabled

        Boolean isConsoleEnabled()
        It Should console logging be enabled?
        Returns:
        true or false
      • getConsoleLevel

        org.apache.logging.log4j.Level getConsoleLevel()
        Get Console Log Level It can be: ALL TRACE DEBUG INFO WARN ERROR FATAL OFF - Custom log levels will be disabled at this project moment.
        Returns:
        an Event Level.
        See Also:
        log4j/2.0/manual/architecture.html
      • getConsolePackages

        List<String> getConsolePackages()
        Get a List of Packages to configure the Log Hierarchy.

        By default The logger engine will consider the same pattern from log4j. For example, the LoggerConfig named "com.foo" is a parent of the LoggerConfig named "com.foo.Bar". Similarly,"java" is a parent of "java.util" and an ancestor of "java.util.Vector". This naming scheme should be familiar to most developers.

        Returns:
        a List of String representing packages Namespaces
        See Also:
        log4j/2.x/manual/architecture.html
      • getConsolePatternLayout

        String getConsolePatternLayout()
        Gets Console Pattern Layout.

        More often than not, users wish to customize not only the output destination but also the output format. This is accomplished by associating a Layout with an Appender. The Layout is responsible for formatting the LogEvent according to the user's wishes, whereas an appender takes care of sending the formatted output to its destination.

        Returns:
        a Pattern Layout String
        See Also:
        log4j/2.x/manual/layouts.html
      • getConsoleIgnoreExceptions

        String getConsoleIgnoreExceptions()
        Should Console Logging Ignore Exceptions?

        The default is true, causing exceptions encountered while appending events to be internally logged and then ignored. When set to false exceptions will be propagated to the caller, instead. You must set this to false when wrapping this Appender in a FailoverAppender.

        Returns:
        Return a String "true" or "false" values, if you return something different from "true" or "false" the DefaultConfigurationFactory will consider as "true".
      • getConsoleTarget

        String getConsoleTarget()
        Output Stream for Console Logger.
        Can be Either "SYSTEM_OUT" or "SYSTEM_ERR". The default is "SYSTEM_OUT".
        Returns:
        a String
      • isFileEnabled

        Boolean isFileEnabled()
        It Should console logging be enabled?
        Returns:
        true or false
      • getFileLevel

        org.apache.logging.log4j.Level getFileLevel()
        Get File Log Level It can be: ALL TRACE DEBUG INFO WARN ERROR FATAL OFF - Custom log levels will be disabled at this project moment.
        Returns:
        an Event Level.
        See Also:
        log4j/2.0/manual/architecture.html
      • getFilePackages

        List<String> getFilePackages()
        Get a List of Packages to configure the Log Hierarchy.

        By default The logger engine will consider the same pattern from log4j. For example, the LoggerConfig named "com.foo" is a parent of the LoggerConfig named "com.foo.Bar". Similarly,"java" is a parent of "java.util" and an ancestor of "java.util.Vector". This naming scheme should be familiar to most developers.

        Returns:
        a List of String representing packages Namespaces
        See Also:
        log4j/2.x/manual/architecture.html
      • getFilePatternLayout

        String getFilePatternLayout()
        Gets File Pattern Layout.

        More often than not, users wish to customize not only the output destination but also the output format. This is accomplished by associating a Layout with an Appender. The Layout is responsible for formatting the LogEvent according to the user's wishes, whereas an appender takes care of sending the formatted output to its destination.

        Returns:
        a Pattern Layout String
        See Also:
        log4j/2.x/manual/layouts.html
      • getFileAppend

        Boolean getFileAppend()
        Get the file append property.

        When true - the default, records will be appended to the end of the file. When set to false, the file will be cleared before new records are written.

        Returns:
        true or false
      • getCreateFileOnDemand

        Boolean getCreateFileOnDemand()
        Get the Create File On Demand property.

        The appender creates the file on-demand. The appender only creates the file when a log event passes all filters and is routed to this appender. Defaults to false.

        Returns:
        true or false
      • getFilePattern

        String getFilePattern()
        Get the file archiving pattern.

        The pattern of the file name of the archived log file Example: .yyyy-MM-dd This pattern will depends on file systems grow policies.

        Returns:
        a String representing the pattern
      • isRemoteEnabled

        Boolean isRemoteEnabled()
        It Should Remote logging be enabled?
        Returns:
        true or false
      • getRemoteLevel

        org.apache.logging.log4j.Level getRemoteLevel()
        Get Remote Log Level It can be: ALL TRACE DEBUG INFO WARN ERROR FATAL OFF - Custom log levels will be disabled at this project moment.
        Returns:
        an Event Level.
        See Also:
        log4j/2.0/manual/architecture.html
      • getRemotePackages

        List<String> getRemotePackages()
        Get a List of Packages to configure the Log Hierarchy. By default The logger engine will consider the same pattern from log4j. For example, the LoggerConfig named "com.foo" is a parent of the LoggerConfig named "com.foo.Bar". Similarly,"java" is a parent of "java.util" and an ancestor of "java.util.Vector". This naming scheme should be familiar to most developers.
        Returns:
        a List of String representing packages Namespaces
        See Also:
        log4j/2.x/manual/architecture.html
      • getRemotePatternLayout

        String getRemotePatternLayout()
        Gets Remote Pattern Layout.

        More often than not, users wish to customize not only the output destination but also the output format. This is accomplished by associating a Layout with an Appender. The Layout is responsible for formatting the LogEvent according to the user's wishes, whereas an appender takes care of sending the formatted output to its destination.

        Returns:
        a Pattern Layout String
        See Also:
        log4j/2.x/manual/layouts.html
      • get

        default String get​(Properties prop,
                           ConfigurationKey key,
                           String defaultValue)
        Get a Property value by the given ConfigurationKey, if the properties not found return the default value.
        Parameters:
        prop - a Properties object
        key - a ConfigurationKey
        defaultValue - a default value
        Returns:
        a Property Value