code: public static TraceEventBatch log(Category cat) {
          final VoltTrace tracer = s_tracer;
          if (tracer != null && tracer.isCategoryEnabled(cat)) {
              final TraceEventBatch batch = new TraceEventBatch(cat);
              tracer.queueEvent(batch);
              return batch;
          } else {
              return null;
          }
      }
docs: Create a trace event batch for the given category. The events that go
  into this batch should all originate from the same thread.
  @param cat The category to write the events to.
  @return The batch object to add events to, or null if trace logging for
  the category is not enabled.