accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ed Coleman (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (ACCUMULO-1242) Consistent logging
Date Sun, 10 Nov 2013 23:12:19 GMT

     [ https://issues.apache.org/jira/browse/ACCUMULO-1242?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Ed Coleman updated ACCUMULO-1242:
---------------------------------

    Affects Version/s: 1.7.0
               Status: Patch Available  (was: Open)

The patch file ACCUMUL-1242.2 replaces the file I uploaded before.

It removes most direct dependencies on log4j exception for cases where additional log4j features
are used.  Some of these such as using DOMConfigurator (which will actually prevent moving
to log4j-2) remain and are probably best handled in separate tickets.

In general:

logging in mapreduce / mapred classes - maybe these are best handled by moving / refactoring
as part of client dependency task.

test classes that accept logfile name on command line. 

Monitoring - log4j extensions are really embedded in the current monitor solution - maybe
if support is added for ganglia / graphite they can be handled then?

Anyway, this patch gets things 90% of the way.

Files that still use log4j
{noformat}
(test class that take logfile name on command line.)
./test/src/main/java/org/apache/accumulo/test/randomwalk/Framework.java:import org.apache.log4j.xml.DOMConfigurator;
./test/src/main/java/org/apache/accumulo/test/continuous/ContinuousIngest.java:import org.apache.log4j.FileAppender;
./test/src/main/java/org/apache/accumulo/test/continuous/ContinuousIngest.java:import org.apache.log4j.Level;
./test/src/main/java/org/apache/accumulo/test/continuous/ContinuousIngest.java:import org.apache.log4j.Logger;
./test/src/main/java/org/apache/accumulo/test/continuous/ContinuousIngest.java:import org.apache.log4j.PatternLayout;

(mapred and mapreduce client classes)

./core/src/test/java/org/apache/accumulo/core/client/mapreduce/lib/util/ConfiguratorBaseTest.java:import
org.apache.log4j.Level;
./core/src/test/java/org/apache/accumulo/core/client/mapreduce/lib/util/ConfiguratorBaseTest.java:import
org.apache.log4j.Logger;
./core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/util/ConfiguratorBase.java:import
org.apache.log4j.Level;
./core/src/main/java/org/apache/accumulo/core/client/mapreduce/lib/util/ConfiguratorBase.java:import
org.apache.log4j.Logger;
./core/src/main/java/org/apache/accumulo/core/client/mapreduce/AbstractInputFormat.java:import
org.apache.log4j.Level;
./core/src/main/java/org/apache/accumulo/core/client/mapreduce/AbstractInputFormat.java:import
org.apache.log4j.Logger;
./core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloFileOutputFormat.java:import
org.apache.log4j.Logger;
./core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java:import
org.apache.log4j.Level;
./core/src/main/java/org/apache/accumulo/core/client/mapreduce/AccumuloOutputFormat.java:import
org.apache.log4j.Logger;
./core/src/main/java/org/apache/accumulo/core/client/mapred/AbstractInputFormat.java:import
org.apache.log4j.Level;
./core/src/main/java/org/apache/accumulo/core/client/mapred/AbstractInputFormat.java:import
org.apache.log4j.Logger;
./core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloFileOutputFormat.java:import
org.apache.log4j.Logger;
./core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java:import
org.apache.log4j.Level;
./core/src/main/java/org/apache/accumulo/core/client/mapred/AccumuloOutputFormat.java:import
org.apache.log4j.Logger;
./start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoaderTest.java:@SuppressStaticInitializationFor({"org.apache.accumulo.start.classloader.AccumuloVFSClassLoader",
"org.apache.log4j.LogManager"})
./start/src/test/java/org/apache/accumulo/start/classloader/vfs/AccumuloVFSClassLoaderTest.java:@PowerMockIgnore({"org.apache.log4j.*",
"org.apache.hadoop.log.metrics", "org.apache.commons.logging.*", "org.xml.*", "javax.xml.*",
"org.w3c.dom.*",

(monitoring)

./trace/src/main/java/org/apache/accumulo/trace/instrument/receivers/LogSpans.java:import
org.apache.log4j.Level;
./trace/src/main/java/org/apache/accumulo/trace/instrument/receivers/LogSpans.java:  private
static final org.apache.log4j.Logger log = org.apache.log4j.Logger.getLogger(LogSpans.class);

(classes added by this patch, moved SendLogToChainsaw)

./logging/src/main/java/org/apache/accumulo/util/logging/Log4jLogging.java:  private static
final String LOGGER_CLASSNAME = "org.apache.log4j.Logger";
./logging/src/main/java/org/apache/accumulo/util/logging/Log4jLogging.java:  private static
final String LEVEL_CLASSNAME = "org.apache.log4j.Level";
./logging/logging-log4j/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java:import
org.apache.log4j.Category;
./logging/logging-log4j/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java:import
org.apache.log4j.Level;
./logging/logging-log4j/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java:import
org.apache.log4j.Logger;
./logging/logging-log4j/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java:import
org.apache.log4j.spi.Filter;
./logging/logging-log4j/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java:import
org.apache.log4j.spi.LocationInfo;
./logging/logging-log4j/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java:import
org.apache.log4j.spi.LoggingEvent;
./logging/logging-log4j/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java:import
org.apache.log4j.spi.ThrowableInformation;
./logging/logging-log4j/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java:import
org.apache.log4j.varia.LevelRangeFilter;
./logging/logging-log4j/src/main/java/org/apache/accumulo/server/util/SendLogToChainsaw.java:import
org.apache.log4j.xml.XMLLayout;

(monitoring)

./server/tserver/src/main/java/org/apache/accumulo/tserver/TLevel.java:import org.apache.log4j.Level;
./server/tserver/src/main/java/org/apache/accumulo/tserver/Tablet.java:import org.apache.log4j.Logger;
./server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/LogServlet.java:import
org.apache.log4j.Level;
./server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/LogServlet.java:import
org.apache.log4j.spi.LoggingEvent;
./server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/BasicServlet.java:import
org.apache.log4j.Level;
./server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/MasterServlet.java:import
org.apache.log4j.Level;
./server/base/src/main/java/org/apache/accumulo/server/monitor/LogService.java:import org.apache.log4j.LogManager;
./server/base/src/main/java/org/apache/accumulo/server/monitor/LogService.java:import org.apache.log4j.Logger;
./server/base/src/main/java/org/apache/accumulo/server/monitor/LogService.java:import org.apache.log4j.net.SocketNode;
./server/base/src/main/java/org/apache/accumulo/server/monitor/LogService.java:import org.apache.log4j.spi.LoggingEvent;
./server/base/src/main/java/org/apache/accumulo/server/monitor/LogService.java:public class
LogService extends org.apache.log4j.AppenderSkeleton {
./server/base/src/main/java/org/apache/accumulo/server/monitor/DedupedLogEvent.java:import
org.apache.log4j.spi.LoggingEvent;
./server/base/src/main/java/org/apache/accumulo/server/Accumulo.java:import org.apache.log4j.LogManager;
./server/base/src/main/java/org/apache/accumulo/server/Accumulo.java:import org.apache.log4j.helpers.FileWatchdog;
./server/base/src/main/java/org/apache/accumulo/server/Accumulo.java:import org.apache.log4j.helpers.LogLog;
./server/base/src/main/java/org/apache/accumulo/server/Accumulo.java:import org.apache.log4j.xml.DOMConfigurator;

{noformat}

> Consistent logging
> ------------------
>
>                 Key: ACCUMULO-1242
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-1242
>             Project: Accumulo
>          Issue Type: Bug
>          Components: build
>    Affects Versions: 1.7.0
>            Reporter: Christopher Tubbs
>            Assignee: Ed Coleman
>              Labels: log4j, logging, logs, slf4j
>             Fix For: 1.7.0
>
>         Attachments: ACCUMULO-1242-2.patch, accumulo-slf4j-snapshot.patch, dynamicLog.tgz
>
>
> Logging dependencies are very inconsistent. It seems we have absolute dependencies on
log4j, yet use slf4j sometimes, and log4j other times. In some of our tests we have slf4j-nop
as a test dependency.
> It seems we could consolidate a lot of this if we simply did:
> # slf4j-api : compile
> # slf4j-log4j12 : runtime
> # slf4j-nop : test
> # log4j : runtime
> We could do this in the parent POM and get rid of all the different dependencies throughout
the code.
> I don't know that we could ever use anything other than slf4j-log4j12 as the implementation
(unless our dependencies broke away from using log4j directly also), but at least we'd clean
up all the logging dependencies in our code/build, and would be ready to switch to something
better if something came along. Further, if somebody wanted to reuse our code, and weren't
tied to log4j, because they didn't need our transitive dependencies that locked in log4j,
they could easily depend on their own slf4j implementation jar, and all the logging in our
code would still work correctly for them without needing to use something like log4j-over-slf4j.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message