Displaying state ID not name in minion log file

9 views
Skip to first unread message

John Hicks

unread,
Dec 22, 2017, 5:27:57 AM12/22/17
to Salt-users
I'm sure I read something about this but I can't find that page again so I'm asking here... Is there a configuration option that allows you to see the ID of a state in the log output instead of the name parameter? So, this state:

cdb_staging_dir_exists:
  file
.directory:
   
- name: /tmp/hosts_data_proxy

Produces this in the log file:

2017-12-22 05:30:25,996 [salt.state       ][INFO    ][23078] Running state [/tmp/hosts_data_proxy] at time 05:30:25.996262
2017-12-22 05:30:25,996 [salt.state       ][INFO    ][23078] Executing state file.directory for /tmp/hosts_data_proxy
2017-12-22 05:30:26,003 [salt.state       ][INFO    ][23078] Completed state [/tmp/hosts_data_proxy] at time 05:30:26.003273 duration_in_ms=7.012

Whereas I would like to see:

2017-12-22 05:30:25,996 [salt.state       ][INFO    ][23078] Running state [cdb_staging_dir_exists] at time 05:30:25.996262
2017-12-22 05:30:25,996 [salt.state       ][INFO    ][23078] Executing state file.directory for /tmp/hosts_data_proxy
2017-12-22 05:30:26,003 [salt.state       ][INFO    ][23078] Completed state [cdb_staging_dir_exists] at time 05:30:26.003273 duration_in_ms=7.012

Is this possible?

Many thanks,
John

John Hicks

unread,
Mar 29, 2018, 5:15:13 AM3/29/18
to Salt-users
*bump* Does anyone know if this is possible?
Reply all
Reply to author
Forward
0 new messages