When compacting a collection that is actively being written it is possible that the collection is larger at the completion of compaction than when it started; I assume that this is an expected outcome. In this case the operation returns a negative number for bytesFreed:
Whereas an absurdly large value is logged for freedBytes:
It looks like compactCollection is incorrectly treating the negative signed value as unsigned when it logs it.
Possibly both values should be logged as 0, since logging a negative value may make it appear that compact is malfunctioning.
Also, it would be good to make the command result and the log statement consistent; suggest changing the log statement to use "bytesFreed" as it seems less likely that users will be affected by changing the log statement than by changing the command return.