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

Implement logging for LibSourcify #1082

Merged
merged 7 commits into from
Jun 30, 2023
Merged

Implement logging for LibSourcify #1082

merged 7 commits into from
Jun 30, 2023

Conversation

marcocastignoli
Copy link
Member

@marcocastignoli marcocastignoli commented Jun 28, 2023

  • Created the simplest logging library inside LibSourcify (with no deps)
  • change the default log level with setLibSourcifyLoggerLevel
  • override the whole logging function with setLibSourcifyLogger implementing ILibSourcifyLogger

use the logger inside lib sourcify with logError, logWarn, logInfo, logDebug

@kuzdogan we need to decide what to log inside lib-sourcify

View in Huly HI-549

src/server/server.ts Outdated Show resolved Hide resolved
@kuzdogan
Copy link
Member

kuzdogan commented Jun 28, 2023

  • Add how to override the logger in lib-sourcify's README

@codecov-commenter
Copy link

codecov-commenter commented Jun 28, 2023

Codecov Report

Patch coverage: 42.85% and project coverage change: -4.69 ⚠️

Comparison is base (2f74618) 79.27% compared to head (c94cef0) 74.59%.

Additional details and impacted files
@@             Coverage Diff             @@
##           staging    #1082      +/-   ##
===========================================
- Coverage    79.27%   74.59%   -4.69%     
===========================================
  Files           55       65      +10     
  Lines         1520     2389     +869     
  Branches       267      439     +172     
===========================================
+ Hits          1205     1782     +577     
- Misses         182      379     +197     
- Partials       133      228      +95     
Flag Coverage Δ
lib-sourcify 66.19% <ø> (?)
server 79.26% <42.85%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
src/server/server.ts 75.22% <42.85%> (-4.78%) ⬇️

... and 11 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@marcocastignoli marcocastignoli marked this pull request as ready for review June 28, 2023 14:27
@marcocastignoli marcocastignoli requested a review from kuzdogan June 28, 2023 14:27
Copy link
Member

@kuzdogan kuzdogan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

There needs to be more work on what to log and on which level to log, but we can work on that later as we see the needs.

Just asking for small changes and clarifications.

src/server/server.ts Outdated Show resolved Hide resolved
packages/lib-sourcify/src/lib/logger.ts Show resolved Hide resolved
packages/lib-sourcify/README.md Outdated Show resolved Hide resolved
packages/lib-sourcify/src/lib/solidityCompiler.ts Outdated Show resolved Hide resolved
@kuzdogan kuzdogan merged commit 42828a3 into staging Jun 30, 2023
@kuzdogan kuzdogan deleted the LibSourcify-logging branch December 19, 2023 18:22
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