diff --git a/lib/ansible/modules/extras/web_infrastructure/ejabberd_user.py b/lib/ansible/modules/extras/web_infrastructure/ejabberd_user.py index 85e5eda8e5..e89918a248 100644 --- a/lib/ansible/modules/extras/web_infrastructure/ejabberd_user.py +++ b/lib/ansible/modules/extras/web_infrastructure/ejabberd_user.py @@ -122,7 +122,7 @@ class EjabberdUser(object): def log(self, entry): """ This method will log information to the local syslog facility """ if self.logging: - syslog.openlog('ansible-%s' % os.path.basename(__file__)) + syslog.openlog('ansible-%s' % self.module._name) syslog.syslog(syslog.LOG_NOTICE, entry) def run_command(self, cmd, options):