Docs Menu

logApplicationMessage

logApplicationMessage

The logApplicationMessage command allows users to post a custom message to the audit log. If running with authorization, users must have clusterAdmin role, or roles that inherit from clusterAdmin, to run the command.

このコマンドは、次の環境でホストされている配置で使用できます。

  • MongoDB Atlas はクラウドでの MongoDB 配置のためのフルマネージド サービスです

注意

このコマンドは、すべての MongoDB Atlas クラスターでサポートされています。すべてのコマンドに対する Atlas のサポートについては、「サポートされていないコマンド」を参照してください。

  • MongoDB Enterprise: サブスクリプションベースの自己管理型 MongoDB バージョン

  • MongoDB Community: ソースが利用可能で、無料で使用できる自己管理型の MongoDB のバージョン

このコマンドの構文は、次のとおりです。

db.runCommand(
{
logApplicationMessage: <string>
}
)

MongoDB associates these custom messages with the audit operation applicationMessage, and the messages are subject to any filtering.