Class PluginLogger


  • public class PluginLogger
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void attach​(java.lang.String pluginPackage)
      Call from Plugin#startUp.
      void clear()  
      void detach()
      Call from Plugin#shutDown.
      java.util.List<LogEntry> getEntries()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PluginLogger

        public PluginLogger()
      • PluginLogger

        public PluginLogger​(int maxEntries)
    • Method Detail

      • attach

        public void attach​(java.lang.String pluginPackage)
        Call from Plugin#startUp. Attaches to the Logback logger for the given package, capturing every @Slf4j call in any class underneath it.
        Parameters:
        pluginPackage - Root package of the plugin, e.g. "com.example.myplugin"
      • detach

        public void detach()
        Call from Plugin#shutDown. Removes the appender and clears the buffer.
      • getEntries

        public java.util.List<LogEntry> getEntries()
      • clear

        public void clear()