Class ScrLogManager.ScrLoggerFacade

    • Constructor Detail

    • Method Detail

      • isLogEnabled

        public boolean isLogEnabled​(InternalLogger.Level level)
        Description copied from interface: InternalLogger
        Answer true if the current logging level is enabled for the given level. For stdout/stderr fallback the logging level is defined by the LogConfiguration.getLogLevel(). If there is an OSGi logger available then the logger name will define the log level via LoggerAdmin.
        Specified by:
        isLogEnabled in interface InternalLogger
        Parameters:
        level - the level to check
        Returns:
        true if the given log level is enabled
      • log

        public void log​(InternalLogger.Level level,
                        java.lang.String format,
                        java.lang.Throwable ex,
                        java.lang.Object... arguments)
        Description copied from interface: InternalLogger
        Formats the message using the MessageFormat class, i.e. with {} place holders for the args. It then calls InternalLogger.log(Level, String, Throwable).
        Specified by:
        log in interface InternalLogger
        Parameters:
        level - only log when this level is implied by the current log level
        format - the message to log
        ex - a Throwable or null
        arguments - the arguments to the MessageFormat formatting
      • log

        public void log​(InternalLogger.Level level,
                        java.lang.String message,
                        java.lang.Throwable ex)
        Description copied from interface: InternalLogger
        Logs the message to an appropriate OSGi logger. If not such logger can be found then it will log to stderr for ERROR & AUDIT messages and stdout for other messages
        Specified by:
        log in interface InternalLogger
        Parameters:
        level - only log when this level is implied by the current log level
        message - the message to log
        ex - a Throwable or null
      • log0

        void log0​(InternalLogger.Level level,
                  java.lang.String message,
                  java.lang.Throwable ex)
      • setPrefix

        void setPrefix​(java.lang.String prefix)
      • component

        public ComponentLogger component​(org.osgi.framework.Bundle bundle,
                                         java.lang.String implementationClassName,
                                         java.lang.String name)
        Specified by:
        component in interface BundleLogger
      • bundle

        public BundleLogger bundle​(org.osgi.framework.Bundle bundle)
        Description copied from interface: ScrLogger
        Create a bundle logger
        Specified by:
        bundle in interface ScrLogger
      • close

        public void close()
        Description copied from interface: ScrLogger
        Close the log manager
        Specified by:
        close in interface ScrLogger