A general pattern I notice in discussions of excessive logging — not just here and not only involving Maven — is to describe a scenario in which a certain log message is useful. This is not hard to do but does not justify the log message. Instead it is necessary to estimate how often that log message will be read and acted on. Any log message that is likely to be acted on less than 1% of the time (often a lot less) should not be turned on by default. It does far more harm by hiding real problems than it does by once in a blue moon giving someone useful info.
The only log messages that should be shown to the developer by default are ones that are expected to be acted on. For instance, a failed assert in a unit test should be logged because the whole point of running a unit test is to fix failures. However a passed assertion should log absolutely nothing by default because no action needs to be taken given a passed test. Logs like Maven's are UIs, and UIs that are cluttered with unactionable, unimportant information are hard to understand and work with. Show the developer what the developer needs to know, and nothing else. On Tue, Feb 21, 2023 at 1:28 PM Piotr P. Karwasz <piotr.karw...@gmail.com> wrote: > > Hi Elliotte, > > On Mon, 20 Feb 2023 at 19:51, Elliotte Rusty Harold <elh...@ibiblio.org> > wrote: > > I don't believe anyone reads most of these messages most of the time. > > In fact, I'd venture that well more than 99% of them are never read by > > anyone. > > Some people started reading these after Log4Shell. On StackOverflow > questions like "Why is Maven downloading ...?"[1] > > If I might add my 2 cents, the right amount of logging should: > > 1. allow people with 56 Kbps connections to understand why the build > is taking ages, > 2. inform the other users (that set -ntp), what does Maven download and why. > > The second case could have logs like: > > Downloading plugin dependencies: > org.apache.maven.plugins:maven-compiler-plugin:3.11.0, > org.apache.maven.shared:maven.shared.utils:3.3.4, ... > Downloading compile dependencies: org.apache.logging.log4j:log4j-api:2.20.0, > ... > > Not sure if this should be at INFO or DEBUG level: during a CI build > this info is important to understand whether a fresh snapshot was > downloaded from a remote repo or the one installed locally (e.g. in > the previous step) is being used. > > Piotr > > [1] https://stackoverflow.com/q/70473780/11748454 > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org > For additional commands, e-mail: dev-h...@maven.apache.org > -- Elliotte Rusty Harold elh...@ibiblio.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org