Making debug on generator a bit more useful

This commit is contained in:
Joakim Erdfelt 2012-07-06 09:45:13 -07:00
parent 9129130a0b
commit 03443cd237
1 changed files with 7 additions and 3 deletions

View File

@ -55,11 +55,15 @@ public class Generator
{
if (LOG.isDebugEnabled())
{
LOG.debug("Buffer: {}",BufferUtil.toDetailString(buffer));
LOG.debug("To Generate: {}",frame);
}
FrameGenerator generator = generators.get(frame.getOpCode());
LOG.debug(generator.getClass().getSimpleName() + " active");
return generator.generate(buffer,frame);
ByteBuffer ret = generator.generate(buffer,frame);
if (LOG.isDebugEnabled())
{
LOG.debug("Generated[{}]: {}",generator.getClass().getSimpleName(),BufferUtil.toDetailString(buffer));
}
return ret;
}
@Override