added ability to log stats by a statskey if one is set