-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Increase Logging for SFTP and file handling #3889
Labels
Comments
ninosamson
changed the title
Increase Logging for SFTP Archiving
Increase Logging for SFTP and file handling
Nov 5, 2024
andrewsignori-aot
added a commit
that referenced
this issue
Nov 6, 2024
## Main PR Goal - Increase the log level at the `SFTPIntegrationBase` without disrupting the consumer's methods and try to limit the amount of refactoring. - Deploy to PROD in the next possible release to allow troubleshooting of current intermittent issues while archiving files. ### Changes - Adapted the `LoggerService.error` to receive a friendly error and log the error itself, keeping it compatible with the existing methods. - Added log messages to all base SFTP operations in the `SFTPIntegrationBase`. The errors are reshown keeping the current behavior for current method consumers. - Adjusted the API `mais.ts` that was using the log context. - Adjusted the global error handler to generate only one log entry instead of three. - Even though the `SFTPIntegrationBase` method is now generating more logs, the archive operation error handling was adjusted to ensure the exception details are logged. - Small refactor to stop passing the `SFTP_ARCHIVE_DIRECTORY` for every archive method.
andrewsignori-aot
added a commit
that referenced
this issue
Nov 6, 2024
) Fix issues from the previous PR for better logging. The main log from the SFTP base would still work but ensuring the logs are added to the Job in some way makes it easier for troubleshooting. The goal is to have all the methods following similar archive catch handling doing something closet to each other. See the example below of a sample that will display errors and `causes`. ![image](https://github.com/user-attachments/assets/dbb7e668-38d0-4f04-95a0-6c09720f308b)
andrewsignori-aot
added a commit
that referenced
this issue
Nov 6, 2024
…#3903) - Upgrade the [ssh2-sftp-client to version 11.0.0](https://www.npmjs.com/package/ssh2-sftp-client). - Minor changes for the logging.
github-merge-queue bot
pushed a commit
that referenced
this issue
Nov 14, 2024
Merge Release v1.15 to Main #260 [- Merge Hotfix v1.14.1 into Release v1.15.0 (](https://github.com/bcgov/SIMS/pull/3940/commits/a94ebcebe3869618244a23d6da5edee887ceeac9)https://github.com/bcgov/SIMS/pull/3885[)] #3889 [- Increase Logging for SFTP and file handling (](https://github.com/bcgov/SIMS/pull/3940/commits/ba81ad5fc894521463837bdcc704c2b8ef64afd3)https://github.com/bcgov/SIMS/pull/3897[)] #3889 [- Increase Logging for SFTP and file handling - (Catch fix)](c791b9e) #3889 - Increase Logging for SFTP and file handling - SSH Lib Upgrade #3912 [- Allow Disbursement Receipts File Integration Scheduler For Pa…] #3924 [- Ecert Creation - "Prefer not to answer" Gender (] #3922 [- PT Monthly Loan Balance - Update Balance (] #3896 [- Mask Institution User Income View (](https://github.com/bcgov/SIMS/pull/3940/commits/ec1c63516c55b557d3a76018c0390f0ff9c3ab9a)https://github.com/bcgov/SIMS/pull/3932[)] --------- Co-authored-by: Shashank Shekhar <[email protected]> Co-authored-by: Andre Pestana <[email protected]> Co-authored-by: Lewis Chen <[email protected]> Co-authored-by: Andrew Boni Signori <[email protected]> Co-authored-by: Dheepak Ramanathan <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Need to increase logging to provide more meaningful information for troubleshooting.
ssh2-sftp-client
.The text was updated successfully, but these errors were encountered: