Removed cancelBackup from suported events for pbm logs
@@ -198,5 +198,78 @@ Shows the status of |PBM|. The output provides the following information:
- |PITR| status
- Valid time ranges for point-in-time recovery and the data size
+.. _logs:
+
+.. rubric:: pbm logs
+
+Shows log information from all |pbm-agent| processes.
+
+The command has the following syntax:
+
+.. code-block:: bash
+
+ pbm logs [<flags>]
+
+The command accepts the following flags:
+
+.. list-table::
+ :header-rows: 1
+ :widths: 30 70
+
+ * - Flag
+ - Description
+ * - ``-t``, ``--tail=20``
+ - Shows last N entries. By default, the output shows last 20 entries.
+ ``0`` means to show all log messages.
+ * - ``-e``, ``--event=EVENT``
+ - Shows logs filtered by a specified event. Supported events:
+
+ - backup
+ - restore
+ - resyncBcpList
+ - pitr
+ - pitrestore
+ - delete
+
+ * - ``-o``, ``--out=text``
+ - Shows log information as text (default) or in JSON format.
+ Supported values: text, json
+ * - ``-n``, ``--node=NODE``
+ - Shows logs for a specified node or a replica set.
+ Specify the node in the format ``replset[/host:port]``
+ * - ``-s``, ``--severity=I``
+ - Shows logs filtered by severity level.
+ Supported levels are (from low to high): D - Debug, I - Info (default), W - Warning, E - Error, F - Fatal.
+
+ The output includes both the specified severity level and all higher ones
+ * - ``-i``, ``--opid=OPID``
+ - Show logs for an operation in progress. The operation is identified by the :term:`OpID`
+
+Find the usage examples in :ref:`pbm.logs`.
+
+.. container:: toggle
+
+ .. container :: header
+
+ **JSON output**
+
+ .. code-block:: javascript
+
+ [
+ {
+ "t": "",
+ "s": 3,
+ "rs": "rs0",
+ "node": "example.mongodb.com:27017",
+ "e": "",
+ "eobj": "",
+ "ep": {
+ "T": 0,
+ "I": 0
+ },
+ "msg": "listening for the commands"
+ },
+ ....
+ ]
.. include:: .res/replace.txt
