Class SystemLog

java.lang.Object
io.openems.common.types.SystemLog

public class SystemLog extends Object
Holds a System-Log line.
  • Constructor Details

  • Method Details

    • fromPaxLoggingEvent

      public static SystemLog fromPaxLoggingEvent(org.ops4j.pax.logging.spi.PaxLoggingEvent event)
      Creates a SystemLog object from a PaxLoggingEvent.
      Parameters:
      event - the PaxLoggingEvent
      Returns:
      the SystemLog object
    • toJson

      public com.google.gson.JsonObject toJson()
      Returns the SystemLog as a JSON Object.
       {
         "time": date,
         "level": string,
         "source": string,
         "message": string
       }
       
      Returns:
      SystemLog as a JSON Object
    • fromJsonObject

      public static SystemLog fromJsonObject(com.google.gson.JsonObject j) throws OpenemsError.OpenemsNamedException
      Parses a JSON-Object to a SystemLog.
      Parameters:
      j - the JSON-Object
      Returns:
      the SystemLog
      Throws:
      OpenemsError.OpenemsNamedException - on error