Skip to content

Logs

ubiops logs

Command: ubiops logs

Description:

Get the logs of your project.

If start < end, the logs are searched forward. If start > end, the logs are searched backward.

Use the query option to filter logs. e.g. text search:

--query '|= "text"'
e.g. Deployment filters:
--query '| deployment_name="deployment-1" | deployment_version="v1"'
e.g. Pipeline filters:
--query '| pipeline_name="pipeline-1" | pipeline_version="v1"'
e.g. Text search + request filters
--query '|= "text" | deployment_request_id="request-id-1"'

Available line filters: - |= for exact string match - |~ for regex match - != for negative exact string match (matched logs will be excluded) - !~ for negative regex match (matched logs will be excluded)

Available label filters (come after |): - = for exact match - =~ for regex match - != for negative exact match (matched logs will be excluded) - !~ for negative regex match (matched logs will be excluded)

Label filters can be chained using connectors and (equivalent to |) and or. e.g. Specific deployment version

--query '| deployment_name="my-deployment" and deployment_version="v1"'
e.g. All logs of request 1 and request 2
--query '| deployment_request_id="request-id-1" or deployment_request_id="request-id-2"'

Arguments: -

Options:

  • --start
    Start of the interval for which the logs are retrieved [default = now]

  • --end
    End of the interval for which the logs are retrieved [default = yesterday]

  • --query/-q
    Query to filter logs, see command description for examples

  • --limit/-n
    Limit of the logs response. The maximum value is 5000.

  • --no_pager
    Return logs directly without pager

  • -fmt/--format
    The output format


ubiops logs list

Command: ubiops logs list

Description:

[DEPRECATED] This method is deprecated, please use ubiops logs instead.

Get the logs of your project.

Use the command options as filters.

Arguments: -

Options:

  • -d/--deployment_name
    The deployment name

  • -dv/--deployment_version_name
    The deployment version name

  • -p/--pipeline_name
    The pipeline name

  • -pv/--pipeline_version_name
    The pipeline version name

  • -po/--pipeline_object_name
    The pipeline object name

  • -bid/--build_id
    The deployment version build ID

  • -iid/--instance_id
    The deployment version instance ID

  • --process_id
    The ID of the instance process

  • -id/--request_id
    The ID of the deployment request

  • -pid/--pipeline_request_id
    The ID of the pipeline request

  • --system
    Filter on logs generated by the system (true) or generated by user code (false)

  • --level
    Filter on logs according to the level of the log

  • --start_date
    Start date of the interval for which the logs are retrieved. Formatted like '2020-01-01T00:00:00.000000Z'. [default = now]

  • --start_log
    Identifier for log lines. If specified, it will act as a starting point for the interval in which to query the logs. This can be useful when making multiple queries to obtain consecutive logs. It will include the log having the log ID equal to the ID value in the response, regardless of whether the date_range is positive or negative.

  • --date_range
    Duration (seconds) of the interval for which the logs are retrieved. If it is positive, logs starting from the specified date / log ID (both inclusive) plus date range seconds towards the present time are returned. Otherwise, logs starting from the specified date / log ID (both inclusive) minus date range seconds towards the past are returned.

  • --limit/-n
    Limit of the logs response. The maximum value is 5000.

  • -fmt/--format
    The output format


ubiops logs get

Command: ubiops logs get

Description:

[DEPRECATED] This method is deprecated, please use ubiops logs instead.

Get more details of a log: - date - deployment_name - deployment_version_name - build_id - instance_id - process_id - pipeline_name - pipeline_version_name - pipeline_object_name - deployment_request_id - pipeline_request_id - system (boolean) - level

Arguments:

  • [required] log_id

Options:

  • -fmt/--format
    The output format