java.lang.Object
io.github.tonywasher.joceanus.oceanus.logger.OceanusLogManager

public final class OceanusLogManager extends Object
Log Manager.
  • Method Details

    • getLogger

      public static OceanusLogger getLogger(Class<?> pOwner)
      Obtain a logger.
      Parameters:
      pOwner - the owning class
      Returns:
      the logger
    • setSink

      public static void setSink(OceanusLogSink pSink)
      Set Sink.
      Parameters:
      pSink - the sink
    • formatMessage

      String formatMessage(Class<?> pOwner, OceanusLogLevel pLevel, String pMessage)
      Format message.
      Parameters:
      pOwner - the owner
      pLevel - the log level
      pMessage - the message to format
      Returns:
      the formatted string
    • formatData

      public static String formatData(byte[] pData)
      Format data.
      Parameters:
      pData - the data to format
      Returns:
      the formatted data
    • formatData

      public static String formatData(byte[] pData, int pOffset, int pLength)
      Format data.
      Parameters:
      pData - the data to format
      pOffset - the offset
      pLength - the length of data
      Returns:
      the formatted data
    • writeLogMessage

      void writeLogMessage(String pMessage)
      Write log message.
      Parameters:
      pMessage - the message to format
    • writeLogMessage

      void writeLogMessage(String pMessage, Throwable pException)
      Write log message and exception.
      Parameters:
      pMessage - the message to format
      pException - the exception