Error log sync in Sunbird Desktop App

Overview: 

Currently, Deskstop App has a logging system that stores the log in the file system. These logs have the type of log, error message, time-stamp. We can debug the errors locally by accessing the log files. 

Problem  statement: 

As part of the error log sync to the server, the system should not have the repetitive/duplicate logs, and it should have the required data to make debugging easier. So we should have listed down some possible errors along with there unique CODE and Identifier

Solution: 

We will list all the possible scenarios where fatal errors might come. Code is a Unique key for error where ID is a combination of the CODE and ID, where ID is an individual attribute for the error such as do_id, batchId. For better implementation, we can encode ID with base64 Encoding.

The following are some Generic errors which may occur during the App lifecycle:

CODE

ID

CODE

ID

1

CONTENT_IMPORT

ecar_filename

2

CONTENT_IMPORT_LOW_DISK_SPACE

low_disk_space
3

CONTENT_IMPORT_ECAR_ADDED_ALREADY

ecar_already_added

4

CONTENT_EXPORT

content_do_id

5

CONTENT_DOWNLOAD

content_do_id

6

CONTENT_DOWNLOAD_LOW_DISK_SPACE

content_do_id

7

CONTENT_DOWNLOAD_EXTRACT_FAILED

content_do_id

8

CONTENT_DELETE

content_do_id

9

TELEMETRY_SYNC

batchId

10

TELEMETRY_IMPORT

file_path

11

TELEMETRY_EXPORT

batch_ID

12

REPORT_ISSUE

help_desk_down

13

FORM_READ

type_subtype_action

14

CHANNEL_READ

channel_id

15

FAQ_READ

language_code

16

TENANT_INFO

tenant_id

17

CONTENT_READ

do_id

18

COURSE_HIERARCHY

do_id

19

DEVICE_PROFILE

device_profile_id

20

DIAL_ASSEMBLE

status (online/offline)

21

CONTENT_SEARCH

search_keyword

22

DESKTOP_UPDATE

app_update

23

SYSTEM_INFO

system_info

24

CHANGE_CONTENT_LOCATION

change_content_location

25

USER_CREATE

user_create

26

USER_READ

user_id

27

USER_UPDATE

user_id

28

LOCATION_SEARCH

location_keyword

29

LOCATION_SAVE

location_keyword

30

APP_START

app_start

31

APP_CRASH

app_crash

32

ELECTRON_DIALOG

req_id (e.g. '/dialog/content/export')

33

CRASH_REPORTER

crash_reporter

34

UNKNOWN

unknown