.. _mongocli-cloud-manager-logs-jobs-collect:

========================================
mongocli cloud-manager logs jobs collect
========================================

.. default-domain:: mongodb

.. contents:: On this page
   :local:
   :backlinks: none
   :depth: 1
   :class: singlecol

Start a job to collect logs for your project.

Syntax
------

.. code-block::
   :caption: Command Syntax

   mongocli cloud-manager logs jobs collect <resourceType> <resourceName> [options]

.. Code end marker, please don't delete this comment

Arguments
---------

.. list-table::
   :header-rows: 1
   :widths: 20 10 10 60

   * - Name
     - Type
     - Required
     - Description
   * - resourceType
     - string
     - true
     - Type of resource to collect logs from.
   * - resourceName
     - string
     - true
     - Name of the resource to collect logs from.

Options
-------

.. list-table::
   :header-rows: 1
   :widths: 20 10 10 60

   * - Name
     - Type
     - Required
     - Description
   * - -h, --help
     - 
     - false
     - help for collect
   * - --logCollectionFromDate
     - int
     - false
     - Timestamp to filter the logs within the range >= LogCollectionFromDate and <= LogCollectionToDate.
   * - --logCollectionToDate
     - int
     - false
     - Timestamp to filter the logs within the range >= LogCollectionFromDate and <= LogCollectionToDate.
   * - -o, --output
     - string
     - false
     - Output format. Valid values are json, json-path, go-template, or go-template-file. To see the full output, use the -o json option.
   * - --projectId
     - string
     - false
     - Hexadecimal string that identifies the project to use. This option overrides the settings in the configuration file or environment variable.
   * - --redacted
     - 
     - false
     - Flag that indicates whether to replace emails, hostnames, IP addresses, and namespaces in API responses involving this job with random string values.
   * - --sizeRequestedPerFileBytes
     - int
     - true
     - Size for each log file in bytes.
   * - --type
     - strings
     - true
     - Array of strings specifying the types of logs to collect.

Inherited Options
-----------------

.. list-table::
   :header-rows: 1
   :widths: 20 10 10 60

   * - Name
     - Type
     - Required
     - Description
   * - -P, --profile
     - string
     - false
     - Name of the profile to use from your configuration file. To learn about profiles for MongoCLI, see https://dochub.mongodb.org/core/atlas-cli-configuration-file.

