Add enough logging for troubleshooting

Created on 4 November 2016, over 7 years ago
Updated 21 July 2023, 11 months ago

Problem/Motivation

Tested provider and faced with unexpected behavior. Didn't find any errors in other messages in log with reason why it doesn't work.

Proposed resolution

Provider should generate logs for every its step. It's FEAT #6 pf requirements. Below possible example

  • Job is sent to Smartling
    • [DEBUG] Uploading job to Smartling. Id = '7', locale = 'zh-CN'
    • [INFO] Job was uploaded to Smartling. Id = '7', locale = 'zh-CN'
  • Job status is updated
    • [DEBUG] Smartling gets translation progress for job id = '1', locale = 'ru-RU'. API response: approvedString = '9', completedString = '9', progress = '100'
  • Translated job is downloaded
    • [INFO] Smartling downloaded the translated job id = '1', locale = 'ru-RU'
  • Upload error
    • [ERROR] Smartling failed to upload job
      Project Id = '1295c174d'
      Action = 'upload'
      fileURI = 'JobID6_en_fr-ca.xlf'
      Error = 'response code -> VALIDATION_ERROR and message -> Invalid locale: ru'
      Upload params = 'Array ( [fileType] => xml [fileUri] => JobID6_en_fr-ca.xlf [callbackUrl] => [approved] => 0 [overwriteApprovedLocales] => 0 [localesToApprove[0]] => ru )'
  • Get status error
    • [ERORR] Smartling tried to check file progress
      Project Id = '1295c174d'
      Action = 'get progress'
      fileURI = 'JobID6_en_fr-ca.xlf'
      Locale = 'ru'
      Error = 'response code -> VALIDATION_ERROR and message -> The locale ru could not be found for project'
  • Context is created
    • [INFO] Uploaded context for job item type = 'node', id = '1'
πŸ“Œ Task
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine dimitrystd

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024