Class LibraryLoggerFactory
- java.lang.Object
-
- com.redwood.scheduler.api.scripting.variables.LibraryLoggerFactory
-
public final class LibraryLoggerFactory extends Object
Factory for loggers for use in RedwoodScript libraries.
-
-
Constructor Summary
Constructors Constructor Description LibraryLoggerFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Logger
getLogger(Class<?> c)
Get a logger for a class.static Logger
getLogger(String name)
Get a logger by name.
-
-
-
Method Detail
-
getLogger
public static Logger getLogger(Class<?> c)
Get a logger for a class. If the class is not in the packagecom.redwood.scheduler.
then the logger name will be prefixed withcom.redwood.scheduer.custom.
Used to avoid adding loggers for code that is not in acom.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 withcom.redwood.scheduler.custom.
then the logger name will be prefixed withcom.redwood.scheduer.custom.
Used to help avoiding to override system loggers for classes likecom.redwood.scheduler.systemcore.JobSchedulingDispatcher
.- Parameters:
name
- the name of the logger.- Returns:
- a logger.
-
-