Why don't you use here something like
log_format = '{appname}: %(message)s'.format(appname=appname)
or even 
syslog_formatter = logging.Formatter('{appname}: %(message)s'.format(appname=appname))

?