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

Print DB name in error logs #51

Merged
merged 1 commit into from
Jul 27, 2023
Merged

Conversation

jeyhun
Copy link
Contributor

@jeyhun jeyhun commented Jul 26, 2023

Started including database name in all errors
Sample error log:

SQL statement could not be executed [dbName=testcrud]
	ERROR: relation "xxxxxx" does not exist (SQLSTATE 42P01)

@jeyhun jeyhun force-pushed the print-DB-name-with-errors branch 2 times, most recently from 4f8cd81 to 07c2925 Compare July 26, 2023 19:03
@codecov-commenter
Copy link

codecov-commenter commented Jul 26, 2023

Codecov Report

Merging #51 (66ad890) into main (50f093f) will decrease coverage by 0.16%.
The diff coverage is 18.42%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #51      +/-   ##
==========================================
- Coverage   70.72%   70.56%   -0.16%     
==========================================
  Files          12       12              
  Lines        1404     1410       +6     
==========================================
+ Hits          993      995       +2     
- Misses        324      328       +4     
  Partials       87       87              
Flag Coverage Δ
unit-tests 70.56% <18.42%> (-0.16%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Changed Coverage Δ
pkg/datastore/database.go 55.28% <17.14%> (-0.43%) ⬇️
pkg/datastore/helper.go 55.19% <33.33%> (+0.29%) ⬆️

@jeyhun jeyhun marked this pull request as ready for review July 26, 2023 19:08
@jeyhun jeyhun self-assigned this Jul 26, 2023
@krishnamiriyala
Copy link
Contributor

@jgafarov can you please update the commit message with sample logs from unit-tests or real setup?

@jeyhun jeyhun force-pushed the print-DB-name-with-errors branch from 07c2925 to 66ad890 Compare July 26, 2023 20:06
@jeyhun
Copy link
Contributor Author

jeyhun commented Jul 26, 2023

@jgafarov can you please update the commit message with sample logs from unit-tests or real setup?

Ok, added

Started including database name in all errors
Sample error log:
SQL statement could not be executed [dbName=testcrud]
	ERROR: relation "xxxxxx" does not exist (SQLSTATE 42P01)
@jeyhun jeyhun force-pushed the print-DB-name-with-errors branch from 66ad890 to b450214 Compare July 26, 2023 20:12
@krishnamiriyala
Copy link
Contributor

Lgtm

@krishnamiriyala krishnamiriyala merged commit 9b232f3 into main Jul 27, 2023
2 checks passed
@jeyhun jeyhun deleted the print-DB-name-with-errors branch July 27, 2023 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants