Class LibraryLoggerFactory


  • public final class LibraryLoggerFactory
    extends Object
    Factory for loggers for use in RedwoodScript libraries.
    • Constructor Detail

      • LibraryLoggerFactory

        public LibraryLoggerFactory()
    • Method Detail

      • getLogger

        public static Logger getLogger​(Class<?> c)
        Get a logger for a class. If the class is not in the package com.redwood.scheduler. then the logger name will be prefixed with com.redwood.scheduer.custom.
        Used to avoid adding loggers for code that is not in a com.redwood.scheduler.** package by scripts that are not shipped by Redwood.
        Parameters:
        c - the class to get a logger for.
        Returns:
        a logger.
      • getLogger

        public static Logger getLogger​(String name)
        Get a logger by name. If the name does not start with com.redwood.scheduler.custom. then the logger name will be prefixed with com.redwood.scheduer.custom.
        Used to help avoiding to override system loggers for classes like com.redwood.scheduler.systemcore.JobSchedulingDispatcher.
        Parameters:
        name - the name of the logger.
        Returns:
        a logger.