Class SilverLoggerProvider

    • Field Detail

      • ROOT_NAMESPACE

        public static final String ROOT_NAMESPACE
        The namespace of the root logger in Silverpeas. This namespace is predefined and each logger taken in charge by the Logging Engine should be a descendant of its logger.
        See Also:
        Constant Field Values
    • Constructor Detail

    • Method Detail

      • getLogger

        public SilverLogger getLogger​(String module)
        Gets the logger that is defined for the specified logging namespace.

        A logging namespace is the name or a category under which the messages will be log. The messages will be logged only if the logging level satisfies the logger's level. If no level is set for the logger, then the level from its nearest ancestor with a specific (non-null) level value is taken into account.

        The logger instance is obtained from the logging namespace by using the SilverLoggerFactory factory. The factory has also the responsibility of the initialization mechanism of the logger from its logging configuration parameters before returning it.
        Parameters:
        module - a logging namespace.
        Returns:
        a logger instance identified by the given logging namespace, manufactured by a SilverLoggerFactory instance.
      • getLogger

        public SilverLogger getLogger​(Object object)
        Gets a logger for the specified object. The logger is found from the package name of the specified object.

        In Silverpeas, each logger namespace matches a package name, starting from the silverpeas subpackage: for a package org.silverpeas.core.io, there is a logger with the namespace silverpeas.core.io.

        Parameters:
        object - the object from which the logger namespace will be determined.
        Returns:
        a logger instance identified by the logging namespace that was determined from the given object, manufactured by a SilverLoggerFactory instance.
        See Also:
        getLogger(String)