-
Notifications
You must be signed in to change notification settings - Fork 54
fix: logging #360
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
base: main
Are you sure you want to change the base?
fix: logging #360
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -139,9 +139,10 @@ export const getEntities = async <S extends Schema>( | |||||||||||||||
| offset, | ||||||||||||||||
| clause, | ||||||||||||||||
| dont_include_hashed_keys: false, | ||||||||||||||||
| order_by: [], | ||||||||||||||||
|
||||||||||||||||
| }); | ||||||||||||||||
|
|
||||||||||||||||
| console.log("entities", entities); | ||||||||||||||||
| if (logging) console.log("entities", entities); | ||||||||||||||||
|
|
||||||||||||||||
| if (logging) console.log(`Fetched ${entities} entities`); | ||||||||||||||||
|
|
||||||||||||||||
|
|
@@ -185,6 +186,7 @@ export const getEvents = async <S extends Schema>( | |||||||||||||||
| offset, | ||||||||||||||||
| clause, | ||||||||||||||||
| dont_include_hashed_keys: false, | ||||||||||||||||
| order_by: [], | ||||||||||||||||
| }, | ||||||||||||||||
| historical | ||||||||||||||||
| ); | ||||||||||||||||
|
|
@@ -256,6 +258,7 @@ export const getEntitiesQuery = async <S extends Schema>( | |||||||||||||||
| offset: cursor, | ||||||||||||||||
| clause: clause || undefined, | ||||||||||||||||
| dont_include_hashed_keys: false, | ||||||||||||||||
| order_by: [], | ||||||||||||||||
| }); | ||||||||||||||||
|
|
||||||||||||||||
| while (continueFetching) { | ||||||||||||||||
|
|
@@ -414,9 +417,10 @@ export const setEntities = async <S extends Schema>( | |||||||||||||||
| ); | ||||||||||||||||
| } | ||||||||||||||||
| } else { | ||||||||||||||||
| console.warn( | ||||||||||||||||
| `Component ${componentName} not found in provided components.` | ||||||||||||||||
| ); | ||||||||||||||||
| if (logging) | ||||||||||||||||
| console.warn( | ||||||||||||||||
| `Component ${componentName} not found in provided components.` | ||||||||||||||||
| ); | ||||||||||||||||
|
Comment on lines
+445
to
+448
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reconsider gating critical warning messages While the change aligns with reducing logging, missing components might indicate a critical issue that developers should always be aware of. Consider keeping this warning unconditional or using a different logging level (error) that's always enabled. Consider reverting this change or using error logging: - if (logging)
- console.warn(
- `Component ${componentName} not found in provided components.`
- );
+ console.error(
+ `Component ${componentName} not found in provided components.`
+ );📝 Committable suggestion
Suggested change
|
||||||||||||||||
| } | ||||||||||||||||
| } | ||||||||||||||||
| } | ||||||||||||||||
|
|
||||||||||||||||
| +1 −1 | .github/workflows/test.yaml | |
| +2 −5 | README.md | |
| +5 −5 | Scarb.lock | |
| +3 −3 | Scarb.toml |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Consider removing unused parameter.
The underscore prefix in
_isSessionSignaturesuggests this parameter is unused. If it's no longer needed, consider removing it entirely.- _isSessionSignature: boolean = false