- if (lp_transfer_logging(module_id)) {
- log_formatted(FLOG, lp_log_format(module_id), "recv",
- file, initial_stats, iflags);
- } else if (log_format && !am_server) {
- log_formatted(FINFO, log_format, "recv",
- file, initial_stats, iflags);
- }
+ int see_item = itemizing && (iflags || verbose > 1);
+ if (am_server) {
+ if (am_daemon && !dry_run && see_item)
+ log_item(file, &stats, iflags, buf);
+ } else if (see_item || iflags & ITEM_LOCAL_CHANGE || *buf
+ || (S_ISDIR(file->mode) && iflags & SIGNIFICANT_ITEM_FLAGS))
+ log_item(file, &stats, iflags, buf);