Class LogMessageNotification
java.lang.Object
io.openems.common.jsonrpc.base.JsonrpcMessage
io.openems.common.jsonrpc.base.AbstractJsonrpcRequest
io.openems.common.jsonrpc.base.JsonrpcNotification
io.openems.common.jsonrpc.notification.LogMessageNotification
Log message.
{ "jsonrpc": "2.0", "id": UUID, "method": "logMessage", "params": { "level": string, "msg": string } }
-
Field Summary
Modifier and TypeFieldDescriptionfinal System.Logger.Level
The log level asSystem.Logger.Level
.static final String
final String
The log message.Fields inherited from class io.openems.common.jsonrpc.base.JsonrpcMessage
JSONRPC_VERSION
-
Method Summary
Modifier and TypeMethodDescriptionstatic LogMessageNotification
from
(JsonrpcNotification notification) CreateLogMessageNotification
from a templateJsonrpcNotification
.com.google.gson.JsonObject
Gets the paramsJsonObject
of theJsonrpcRequest
.Methods inherited from class io.openems.common.jsonrpc.base.AbstractJsonrpcRequest
getFullyQualifiedMethod, getMethod, toJsonObject
Methods inherited from class io.openems.common.jsonrpc.base.JsonrpcMessage
from, from, toString
-
Field Details
-
METHOD
- See Also:
-
level
The log level asSystem.Logger.Level
. -
msg
The log message.
-
-
Method Details
-
from
public static LogMessageNotification from(JsonrpcNotification notification) throws OpenemsError.OpenemsNamedException CreateLogMessageNotification
from a templateJsonrpcNotification
.- Parameters:
notification
- the templateJsonrpcNotification
- Returns:
- Created
LogMessageNotification
- Throws:
OpenemsError.OpenemsNamedException
- on parse error
-
getParams
public com.google.gson.JsonObject getParams()Description copied from class:AbstractJsonrpcRequest
Gets the paramsJsonObject
of theJsonrpcRequest
.- Specified by:
getParams
in classAbstractJsonrpcRequest
- Returns:
- the params as
JsonObject
-