Documentation Home

Flume Developer Guide

flume-dev@cloudera.org

Revision History
Revision 0.9.3February 4 2011F

Table of Contents

1. Logging
1.1. Setting Up Logging
1.2. Logging Exceptions
1.3. Logging Formatting and Performance Notes
2. Writing Documentation

1. Logging

Logging is implemented using the SLF4J API.

Be sure to read the SLF4J documentation.

1.1. Setting Up Logging

Typically each class has its own logger. We declare these as follows:

private static final Logger LOG = LoggerFactory.getLogger(MyClass.class);

Things to note here:

  • We make all loggers private static final (and in that order).
  • We name all of our loggers LOG.
  • We just pass the class, we don’t call .getName() on the class.

1.2. Logging Exceptions

We are using the 1.6 version of SLF4J, so we get to take advantage of the improved support for logging exceptions.

1.3. Logging Formatting and Performance Notes

For a good discussion of this, see the relevant section in the SLF4J FAQ.

2. Writing Documentation

Documentation is written using AsciiDoc.

     ______
    / ___//_  ______  ____
   / /_/ / / / /    \/ __/
  / __/ / /_/ / / / / __/
 / / /_/\____/_/_/_/\__/
/_/ Distributed Log Collection.