mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #32239 from alprs/fix-file_log_warning
Add state file name to warning log line
This commit is contained in:
commit
7fce438b67
1 changed files with 5 additions and 5 deletions
|
@ -1416,11 +1416,11 @@ def managed(name,
|
|||
if not source and contents_count == 0 and replace:
|
||||
replace = False
|
||||
log.warning(
|
||||
'Neither \'source\' nor \'contents\' nor \'contents_pillar\' nor '
|
||||
'\'contents_grains\' was defined, yet \'replace\' was set to '
|
||||
'\'True\'. As there is no source to replace the file with, '
|
||||
'\'replace\' has been set to \'False\' to avoid reading the file '
|
||||
'unnecessarily.'
|
||||
'State for file: {0} - Neither \'source\' nor \'contents\' nor '
|
||||
'\'contents_pillar\' nor \'contents_grains\' was defined, yet '
|
||||
'\'replace\' was set to \'True\'. As there is no source to '
|
||||
'replace the file with, \'replace\' has been set to \'False\' to '
|
||||
'avoid reading the file unnecessarily.'.format(name)
|
||||
)
|
||||
|
||||
# Use this below to avoid multiple '\0' checks and save some CPU cycles
|
||||
|
|
Loading…
Add table
Reference in a new issue