On a Mac, you have the option to save your logbook database in an alternate location. The data location needs to remain consistent for iCloud Sync to function, so it is necessary to choose 'Remember this Location' when opening your logbook from an alternate location.
If you wish to use iCloud Sync with Dropbox, it is very important that the logbook file in Dropbox is not shared by multiple Macs. Multiple Macs can use logbooks in Dropbox, as long as they each use their own logbook file.
Please refer to this article regarding Dropbox backup and alternate logbook locations for more information and additional details for setting up this behavior.