Class LoggerFactory


  • public class LoggerFactory
    extends Object
    A factory for Logger that resolves a suitable implementation. As a rule plugin developers should use getLogger(String) method to get logger instance. This will ensure that messages logged by the plugin are distinguishable from other log messages. Use getInstance() method only if you know exactly what you are doing.
    Author:
    Jevgeni Kabanov (ekabanov@zeroturnaround.com), Aleksei Sosnovski
    • Constructor Detail

      • LoggerFactory

        public LoggerFactory()
    • Method Detail

      • getLogger

        public static Logger getLogger​(String prefix)
        Utility method, works same as getInstance().productPrefix(prefix)
        Parameters:
        prefix - Prefix used for every log message. Should not be null.
        Returns:
        a suitable Logger implementation.
      • getInstance

        public static Logger getInstance()
        Returns:
        a suitable Logger implementation.