Skip to content

[DECO-228] Format output logs and also output to a file - #153

Merged
fjakobs merged 10 commits into
mainfrom
format-logs
Nov 4, 2022
Merged

[DECO-228] Format output logs and also output to a file#153
fjakobs merged 10 commits into
mainfrom
format-logs

Conversation

@kartikgupta-db

@kartikgupta-db kartikgupta-db commented Nov 1, 2022

Copy link
Copy Markdown
Contributor

Also setup basic vscode settings options for log length etc

Truncation Depth = 2

{
  logger: 'SDK',
  operationId: 'cf9f7fd8-bb44-446b-a694-76c9477b44db',
  operationName: 'ClustersService.list',
  loggingFunction: 'ApiClient.request',
  timestamp: '11/2/2022, 11:51:42 PM',
  request: { method: 'GET' },
  response: {
    clusters: '[{"cluster_id":"1017-064207-v53fc7dm","c ...(31937 bytes more)'
  },
  level: 'debug',
  message: 'https://adb-309687753508875.15.azuredatabricks.net/api/2.0/clusters/list?can_use_client='
}

Truncation Depth = 3

{
    logger: 'SDK',
    operationId: '2e97c02c-f8da-4bcb-8cfc-bfba71b1fe47',
    operationName: 'ClustersService.list',
    loggingFunction: 'ApiClient.request',
    timestamp: '11/2/2022, 11:54:11 PM',
    request: { method: 'GET' },
    response: {
      clusters: [
        '{"cluster_id":"1017-064207-v53fc7dm","cr ...(1310 bytes more)',
        '{"cluster_id":"0818-155213-scc3x4dj","cr ...(1329 bytes more)',
        '...20 more items'
      ]
    },
    level: 'debug',
    message: 'https://adb-309687753508875.15.azuredatabricks.net/api/2.0/clusters/list?can_use_client='
}

Truncation Depth = 4

{
  logger: "SDK",
  operationId: "5a670a2c-dd12-4b95-8390-76bd727452e1",
  operationName: "ClustersService.list",
  loggingFunction: "ApiClient.request",
  timestamp: "11/2/2022, 11:54:42 PM",
  request: { method: "GET" },
  response: {
    clusters: [
      {
        cluster_id: "1017-064207-v53fc7dm",
        creator_user_name: "61b77d30-bc10-4214-9650-29cf5db0e941",
        spark_context_id: "4923128785231340000",
        cluster_name: "sdk-go-cluster-heabciilbkij",
        spark_version: "10.4.x-scala2.12",
        spark_conf:
          '{"spark.databricks.delta.preview.enabled ...(9 bytes more)',
        azure_attributes:
          '{"first_on_demand":1,"availability":"ON_ ...(38 bytes more)',
        node_type_id: "Standard_F4",
        driver_node_type_id: "Standard_F4",
        autotermination_minutes: "10",
        enable_elastic_disk: "true",
        disk_spec: "{}",
        cluster_source: "UI",
        enable_local_disk_encryption: "false",
        instance_source: '{"node_type_id":"Standard_F4"}',
        driver_instance_source: '{"node_type_id":"Standard_F4"}',
        effective_spark_version: "10.4.x-scala2.12",
        state: "TERMINATED",
        state_message:
          "Inactive cluster terminated (inactive fo ...(14 bytes more)",
        start_time: "1665988927301",
        terminated_time: "1665989855187",
        last_state_loss_time: "1665989248506",
        last_activity_time: "1665989229258",
        last_restarted_time: "1665989248621",
        num_workers: "2",
        default_tags:
          '{"Vendor":"Databricks","Creator":"61b77d ...(159 bytes more)',
        termination_reason:
          '{"code":"INACTIVITY","type":"SUCCESS","p ...(44 bytes more)',
        init_scripts_safe_mode: "false",
      },
      {
        cluster_id: "0818-155213-scc3x4dj",
        creator_user_name: "serge.smertin@databricks.com",
        spark_context_id: "6399405132010977000",
        cluster_name: "Default Test Cluster",
        spark_version: "11.3.x-scala2.12",
        spark_conf:
          '{"spark.databricks.delta.preview.enabled ...(9 bytes more)',
        azure_attributes:
          '{"first_on_demand":1,"availability":"ON_ ...(38 bytes more)',
        node_type_id: "Standard_L8as_v3",
        driver_node_type_id: "Standard_DS3_v2",
        autotermination_minutes: "60",
        enable_elastic_disk: "true",
        disk_spec: "{}",
        cluster_source: "UI",
        enable_local_disk_encryption: "false",
        instance_source: '{"node_type_id":"Standard_L8as_v3"}',
        driver_instance_source: '{"node_type_id":"Standard_DS3_v2"}',
        effective_spark_version: "11.3.x-scala2.12",
        state: "TERMINATED",
        state_message:
          "Inactive cluster terminated (inactive fo ...(14 bytes more)",
        start_time: "1660837933746",
        terminated_time: "1667412178375",
        last_state_loss_time: "1667408387771",
        last_activity_time: "1667408547018",
        last_restarted_time: "1667408387822",
        autoscale: '{"min_workers":1,"max_workers":50}',
        default_tags:
          '{"Vendor":"Databricks","Creator":"serge. ...(144 bytes more)',
        termination_reason:
          '{"code":"INACTIVITY","type":"SUCCESS","p ...(44 bytes more)',
        init_scripts_safe_mode: "false",
      },
      "...20 more items",
    ],
  },
  level: "debug",
  message:
    "https://adb-309687753508875.15.azuredatabricks.net/api/2.0/clusters/list?can_use_client=",
}

Screenshot 2022-11-03 at 16 51 02

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants