lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shawn Heisey (JIRA)" <>
Subject [jira] [Commented] (SOLR-8324) Logger Untanglement
Date Fri, 20 Nov 2015 19:05:11 GMT


Shawn Heisey commented on SOLR-8324:

A static method could be added to a utility class, using the Thread call that I found.  A
call to that method can be used in every class that needs a logger.

  private static final log = SomeUtilClass.getDefaultLogger();

> Logger Untanglement
> -------------------
>                 Key: SOLR-8324
>                 URL:
>             Project: Solr
>          Issue Type: Improvement
>            Reporter: Mike Drob
>             Fix For: Trunk
> I propose that we do a thorough examination of how we use loggers over the whole project.
There are many instances of loggers being shared between classes that make troubleshooting
difficult, and we can probably clean up some of the usage that has accumulated over numerous
code moves and refactorings.
> Because this has the potential to scope wildly out of control, I would like to break
the work down into several subtasks.
> * Loggers should be declared all three of {{private static final}} when possible. This
both helps avoid the situations described in later bullets, and might provide a very minor
performance improvement.
> * Distinct classes should not use loggers from other classes, unless they are explicitly
delegated to do so.
> * Subclasses should declare their own loggers instead of relying on loggers from parent
> * Examine if forbidden-api or some other tool(s) can help maintain this, once we reach
a desired state.
> Each bullet might turn into one or more tasks, depending on how invasive individual changes

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message