Package io.openems.common.types
Class SystemLog
java.lang.Object
io.openems.common.types.SystemLog
Holds a System-Log line.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionSystemLog
(ZonedDateTime time, SystemLog.Level level, String source, String message) -
Method Summary
Modifier and TypeMethodDescriptionstatic SystemLog
fromJsonObject
(com.google.gson.JsonObject j) Parses a JSON-Object to a SystemLog.static SystemLog
fromPaxLoggingEvent
(org.ops4j.pax.logging.spi.PaxLoggingEvent event) Creates a SystemLog object from a PaxLoggingEvent.com.google.gson.JsonObject
toJson()
Returns the SystemLog as a JSON Object.
-
Constructor Details
-
SystemLog
-
-
Method Details
-
fromPaxLoggingEvent
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
-