Or ldapsearch, actually. Syntax follows.
Making a note of this because I actually forgot how to do it and stumbled around before checking one of my older scripts.
ldapmodify -h localhost -D "cn=directory manager" -w xxxx -c -f changes.ldif >ops.log 2>&1
That’s all there is to it. The key is in the “2>&1” at the end, which captures stderr and pipes it to stdout for inclusion of both in your log file.