Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
32 lines (22 sloc) 931 Bytes
=====================
logApplicationMessage
=====================
.. default-domain:: mongodb
.. contents:: On this page
:local:
:backlinks: none
:depth: 1
:class: singlecol
.. dbcommand:: logApplicationMessage
.. include:: /includes/note-audit-in-enterprise-only.rst
The :dbcommand:`logApplicationMessage` command allows users to post
a custom message to the :doc:`audit </core/auditing>` log. If
running with authorization, users must have :authrole:`clusterAdmin`
role, or roles that inherit from :authrole:`clusterAdmin`, to run
the command.
The :dbcommand:`logApplicationMessage` has the following syntax:
.. code-block:: javascript
{ logApplicationMessage: <string> }
MongoDB associates these custom messages with the :ref:`audit
operation <audit-action-details-results>` ``applicationMessage``,
and the messages are subject to any :ref:`filtering <audit-filter>`.
You can’t perform that action at this time.