Skip to content
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

366 Create a api-logs file containing the logs #367

Conversation

dimitur2204
Copy link
Contributor

@dimitur2204 dimitur2204 commented Nov 24, 2022

Partly solves #366
Added a PodkrepiLogger, extending the NestJS logger to now write to a file logs of level higher than LOG in addition to logging in the conosle.
That was suggested by @imilchev since we couldn't debug a backend error while running in GitHub actions.

However I found that errors such as database connections or some unexpected crashes are not passed through the Logger which defeats the point, especially considering most of the errors in GitHub Actions are probably of that type! I still haven't found a solution and would appreciate help.

@dimitur2204 dimitur2204 requested a review from imilchev November 24, 2022 12:03
@dimitur2204 dimitur2204 self-assigned this Nov 24, 2022
@dimitur2204 dimitur2204 requested a review from kachar November 24, 2022 12:03
@github-actions
Copy link

github-actions bot commented Nov 24, 2022

Coverage report

St.
Category Percentage Covered / Total
🟡 Statements 71.76% 1903/2652
🔴 Branches 46.44% 248/534
🔴 Functions 44.49% 222/499
🟡 Lines 69.87% 1688/2416

Test suite run success

180 tests passing in 64 suites.

Report generated by 🧪jest coverage report action from 4fd07bc

@dimitur2204
Copy link
Contributor Author

366 - add prismaClientInitialization errors to the catch decorator This commit also doesn't seem to solve the problem of catching the base init error

@imilchev
Copy link
Contributor

I think we can close this one since we tackled the problem differently in podkrepi-bg/frontend#1110

@kachar kachar closed this Nov 24, 2022
@kachar kachar deleted the 366-feature-dump-error-logs-to-a-file-with-an-artifact-in-the-cicd branch November 24, 2022 17:25
@kachar
Copy link
Member

kachar commented Nov 24, 2022

Solved the file logging by running yarn start &> api.log & in the workflow

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