question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Set up Error Prone check to prevent use of native Gradle and Maven loggers

See original GitHub issue

Using the native Gradle logger was probably why our deprecation messages were overwritten.

We should be careful not to make use of the native Maven or Gradle loggers. We can prevent misuse in ProjectProperties by just using consoleLogger. But it is very easy to accidentally use the native loggers in Maven mojos and Gradle tasks. Unfortunately, now I realized we had used the native loggers when printing deprecation notices.

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
loosebazookacommented, Nov 25, 2019

I think we can ask error prone to mark any use of the gradle logger or maven logger as unsafe in our codebase, just speculating though. (we would write this check)

0reactions
chanseokohcommented, Nov 27, 2019

I tried to see how Error Prone can be configured to detect this. Looks like we have to write a custom check in Java. This seems fairly involved. May need to create another Gradle sub-project. I’ll rename this issue and add the “tech debt” label to be open.

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to setup error prone with gradle (getting various errors)
Solved as below. Add Gradle plugin to build.gradle file. plugins { id("net.ltgt.errorprone") version "1.1.0" }. Release versions.
Read more >
Upgrading your build from Gradle 7.x to the latest
Try running gradle help --scan and view the deprecations view of the generated build scan. Deprecations View of a Gradle Build Scan. This...
Read more >
Upgrading your build from Gradle 5.x to 6.0
Try running gradle help --scan and view the deprecations view of the generated build scan. Deprecations View of a Gradle Build Scan. This...
Read more >
userguide.pdf - Gradle User Manual
In most use cases, you'll use existing tasks. Gradle provides tasks that implement many common build system needs, like the built-in Java Test...
Read more >
Testing in Java & JVM projects - Gradle User Manual
If you don't want to use test class detection, you can disable it by setting the scanForTestClasses property on Test to false ....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found