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

Remove usage of LazyLogging #3115

Closed
wants to merge 1 commit into from

Conversation

echeipesh
Copy link
Contributor

@echeipesh echeipesh commented Oct 4, 2019

Overview

GeoTrellis uses com.typesafe.scalalogging package. This is a popular library but unfortunately the LazyLogging trait that is used to mix-in a logger has shifted around a number of timers through the version history. This causes frequent binary incompatibility problems.

This PR removes any mention of LazyLogging trait and replaces it with protected lazy val logger: Logger fields. The Logger class is a little more stable.

Additionally:

  • ArrayTile no longer warns on narrowing celltype conversion
  • GeoWave/GeoMesa do not log errors with experimental notice

Checklist

  • docs/CHANGELOG.rst updated, if necessary
  • [ ] docs guides update, if necessary
  • [ ] New user API has useful Scaladoc strings
  • [ ] Unit tests added for bug-fix or new feature

This cuts down on possible compatability problems across scalalogging verions.
- ArrayTile no longer warns on narrowing celltype conversion
- GeoWave/GeoMesa do not log errors with experimental notice
@pomadchin
Copy link
Member

pomadchin commented Oct 4, 2019

Hm, I like that we had to extend a common LazyLogger trait, sounds like a much better alternative to copy-pasting everywhere the same @transient protected lazy val logger = Logger(LoggerFactory.getLogger(getClass.getName)) line.

@echeipesh
Copy link
Contributor Author

Do you feel strongly about that? I think I'm being just a bit defensive and trying to make logging as private as possible without even dependency on geotrellis-util package

@metasim
Copy link
Member

metasim commented Oct 7, 2019

Thanks guys for this!! I'm also in the defensive camp, even if it's not rational.

@pomadchin
Copy link
Member

@metasim we came to a solution that satisfied both sides #3116

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