# Ansible syslogs to user.notice on the managed machine - can I change this?

**URL:** <https://forum.ansible.com/t/ansible-syslogs-to-user-notice-on-the-managed-machine-can-i-change-this/24956>\
**Category:** Ansible Project\
**Created:** [July 11, 2017, 7:34pm UTC](https://forum.ansible.com/t/ansible-syslogs-to-user-notice-on-the-managed-machine-can-i-change-this/24956 "2017-07-11T19:34:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ed\_Greenberg](https://avatars.discourse-cdn.com/v4/letter/e/7ab992/32.png) [@Ed\_Greenberg](https://forum.ansible.com/u/Ed_Greenberg)\
**Post date:** [July 11, 2017, 7:34pm UTC](https://forum.ansible.com/t/ansible-syslogs-to-user-notice-on-the-managed-machine-can-i-change-this/24956/1 "2017-07-11T19:34:47Z")

</div>

I have a task logging to user.notice, and I can’t change it.

Ansible also logs to user.notice, and I’m wondering if I can change where it does that on a global basis. One of the locals would be nice.

Any way to do this?

Ed Greenberg

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [July 11, 2017, 7:44pm UTC](https://forum.ansible.com/t/ansible-syslogs-to-user-notice-on-the-managed-machine-can-i-change-this/24956/2 "2017-07-11T19:44:49Z")

</div>

You can turn it off with no\_target\_syslog config entry, but there is  
no current way of changing the logging target.

---

<div class="post-metadata">

**Author:** ![Ed\_Greenberg](https://avatars.discourse-cdn.com/v4/letter/e/7ab992/32.png) [@Ed\_Greenberg](https://forum.ansible.com/u/Ed_Greenberg)\
**Post date:** [July 12, 2017, 1:05pm UTC](https://forum.ansible.com/t/ansible-syslogs-to-user-notice-on-the-managed-machine-can-i-change-this/24956/3 "2017-07-12T13:05:26Z")

</div>

This is how I solved the problem in rsyslog.conf:

`  
if $pri-text == ‘user.notice’ and $msg contains ‘ansible’ then {  
/var/log/ansible.log  
stop  
}

`

I put this pretty close to the top of the rsyslog.conf, above GLOBAL DIRECTIVES.
