Class MessageRouter

java.lang.Object
org.spongepowered.asm.util.logging.MessageRouter

public final class MessageRouter extends Object
Logging router for objects which may need to log messages during standard runtime or during Annotation Processor sessions. Provides a single interface to obtain a Messager to write log entries in either environment.
  • Method Details

    • getMessager

      public static Messager getMessager()
      Get the current messager. If no messager is available the returned Messager sinks messages to a log4j2 logger
    • setMessager

      public static void setMessager(Messager messager)
      Set the messager to use, this should only be called by the AP
      Parameters:
      messager - new messager to sink messages, can be null to revert to log4j2 logging