logApplicationMessage

logApplicationMessage
Note注意

Available only in MongoDB Enterprise and MongoDB Atlas.仅在MongoDB企业版和MongoDB Atlas中可用。

The logApplicationMessage command allows users to post a custom message to the audit log. logApplicationMessage命令允许用户向审核日志发布自定义消息。If running with authorization, users must have clusterAdmin role, or roles that inherit from clusterAdmin, to run the command.如果使用授权运行,则用户必须具有clusterAdmin角色或从clusterAdmin继承的角色才能运行该命令。

The logApplicationMessage has the following syntax:logApplicationMessage具有以下语法:

{ logApplicationMessage: <string> }

MongoDB associates these custom messages with the audit operation applicationMessage, and the messages are subject to any filtering.MongoDB将这些自定义消息与审计操作applicationMessage相关联,并且这些消息可以进行任何筛选

←  System Events Auditing Commandsmongosh Methods →