MPS 2019.1ヘルプ


The jetbrains.mps.baselanguage.logging language contains statements for writing arbitrary information into the MPS log as well as to the メッセージ tool view panel. The LogLowLevelStatement concept (aka "log error ...") is used for logging using the system logger, while MsgStatement (aka "message error...") is used for logging into the メッセージ tool window.


The language supports different severities of log messages:

  • トレース

  • 情報

  • デバッグ

  • 警告

  • エラー

  • 致命的

Whenever you want to insert a log statement into code, start by typing either "log" or "message" followed by the desired severity:


Upon completion the log statement with an empty message will be inserted.


The severity level can always be changed:


The log statement also supports exceptions to be specified:


MsgStatement contains an additional parameter to specify the project:


When multiple projects are open in MPS at the same time, each project gets its own MPS windows and thus also its own メッセージ view. The project parameter is used to output the log message into the メッセージ window of the right project. If you leave the parameter empty, the message will be logged into メッセージ tool views of all open projects.

最終更新日: 2019年6月7日