定义
logApplicationMessageThe
logApplicationMessagecommand allows users to post a custom message to the audit log. If running with authorization, users must haveclusterAdminrole, or roles that inherit fromclusterAdmin, to run the command.
兼容性
此命令可用于以下环境中托管的部署:
MongoDB Enterprise:基于订阅、自我管理的 MongoDB 版本
MongoDB Community:源代码可用、免费使用且可自行管理的 MongoDB 版本
语法
该命令具有以下语法:
db.runCommand( { logApplicationMessage: <string> } )