Class LoggerContext

    • Field Detail


        public static final boolean DEFAULT_PACKAGING_DATA
        Default setting of packaging data in stack traces
        See Also:
        Constant Field Values
    • Constructor Detail

      • LoggerContext

        public LoggerContext()
    • Method Detail

      • setName

        public void setName​(String name)
        Description copied from class: ContextBase
        The context name can be set only if it is not already set, or if the current name is the default context name, namely "default", or if the current name and the old name are the same.
        Specified by:
        setName in interface Context
        setName in class ContextBase
      • getLogger

        public final Logger getLogger​(Class<?> clazz)
      • getLogger

        public final Logger getLogger​(String name)
        Description copied from interface: ILoggerFactory
        Return an appropriate Logger instance as specified by the name parameter.

        If the name parameter is equal to Logger.ROOT_LOGGER_NAME, that is the string value "ROOT" (case insensitive), then the root logger of the underlying logging system is returned.

        Null-valued name arguments are considered invalid.

        Certain extremely simple logging systems, e.g. NOP, may always return the same logger instance regardless of the requested name.

        Specified by:
        getLogger in interface ILoggerFactory
        name - the name of the Logger to return
        a Logger instance
      • exists

        public Logger exists​(String name)
        Check if the named logger exists in the hierarchy. If so return its reference, otherwise returns null.
        name - the name of the logger to search for.
      • getLoggerList

        public List<Logger> getLoggerList()
      • getLoggerContextRemoteView

        public LoggerContextVO getLoggerContextRemoteView()
      • setPackagingDataEnabled

        public void setPackagingDataEnabled​(boolean packagingDataEnabled)
      • isPackagingDataEnabled

        public boolean isPackagingDataEnabled()
      • reset

        public void reset()
        This method clears all internal properties, except internal status messages, closes all appenders, removes any turboFilters, fires an OnReset event, removes all status listeners, removes all context listeners (except those which are reset resistant).

        As mentioned above, internal status messages survive resets.

        reset in class ContextBase
      • addTurboFilter

        public void addTurboFilter​(TurboFilter newFilter)
      • resetTurboFilterList

        public void resetTurboFilterList()
        First processPriorToRemoval all registered turbo filters and then clear the registration list.
      • getMaxCallerDataDepth

        public int getMaxCallerDataDepth()
      • setMaxCallerDataDepth

        public void setMaxCallerDataDepth​(int maxCallerDataDepth)
      • getFrameworkPackages

        public List<String> getFrameworkPackages()
        List of packages considered part of the logging framework such that they are never considered as callers of the logging framework. This list used to compute the caller for logging events.

        To designate package "" as well as all its subpackages as being part of the logging framework, simply add "" to this list.

        list of framework packages