-
Notifications
You must be signed in to change notification settings - Fork 0
move to cats logger #2
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
Conversation
5b70a60 to
afbbbd6
Compare
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.
Pull request overview
This PR migrates the logging implementation from LazyLogging (typesafe scala-logging) to log4cats, a functional logging library that integrates with the Cats Effect ecosystem. The changes make logging effectful and polymorphic over effect types.
Key changes:
- Refactored
CatsLoggertrait to provide a polymorphic logger method instead of a fixedIO-based logger - Updated all components (
S3Writer,EtlPipeline,Main) to use effectful logging vialog4cats - Simplified
DataRepositoryto a function-based implementation and added doobie derivation forSampleData
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/main/scala/com/async2databricks/utils/CatsLogger.scala |
Changed from IO-specific logger to polymorphic logger supporting any effect type with Sync |
src/main/scala/com/async2databricks/s3/S3Writer.scala |
Replaced LazyLogging with CatsLogger; made methods polymorphic; converted side-effecting logs to effectful operations |
src/main/scala/com/async2databricks/model/SampleData.scala |
Added doobie Read and Write derivation and necessary imports |
src/main/scala/com/async2databricks/etl/EtlPipeline.scala |
Replaced LazyLogging with CatsLogger; refactored to use effectful logging throughout |
src/main/scala/com/async2databricks/database/DataRepository.scala |
Simplified to function-based implementation; removed custom Read instance (now derived); removed unused imports |
src/main/scala/com/async2databricks/Main.scala |
Updated to obtain logger instance explicitly for IO effect type |
project/plugins.sbt |
Downgraded sbt-scoverage plugin version |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/main/scala/com/async2databricks/database/DataRepository.scala
Outdated
Show resolved
Hide resolved
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.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: akreit <64101884+akreit@users.noreply.github.com>
…ambda Co-authored-by: akreit <64101884+akreit@users.noreply.github.com>
Fix DataRepository to return trait implementation instead of lambda
Properly sequence logging effects in S3Writer
Co-authored-by: akreit <64101884+akreit@users.noreply.github.com>
Restore ETL pipeline completion log message
No description provided.