As of Samba 4.0, %m no longer works and several other substitution variables no longer work either. This breaks the default configuration on Debian systems, which use /var/log/samba/log.%m as log file name.