Skip to content

Add timestamp to error message for troubleshooting purposes #11

Closed
@TheScriptGuy

Description

@TheScriptGuy

If the script is unable to upload data to a MongoDB server, the error message that's generated does not include a timestamp for that particular time the script is executed.

Update the output errors to include the timestamp for better troubleshooting.

Current example:

2023-04-15 16:40:38.600808 - [<pymongo.results.InsertOneResult object at 0x7f1209c5d840>]
2023-04-15 17:40:40.212915 - [<pymongo.results.InsertOneResult object at 0x7f0ebabe9840>]
Server connection timeout error when uploading data.
Saving to certificateData.json

Expected result:

2023-04-15 16:40:38.600808 - [<pymongo.results.InsertOneResult object at 0x7f1209c5d840>]
2023-04-15 17:40:40.212915 - [<pymongo.results.InsertOneResult object at 0x7f0ebabe9840>]
2023-04-15 18:40:40.123413 - Server connection timeout error when uploading data. Saving to certificateData.json

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions