You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The 'log' resource, when used in a recipe, ignores the 'message' attribute and instead will use whatever the name of the log resource is as its message.
The following will always spit out "message"
log 'message' do
message 'This is the message that should be added to the log.'
level :info
end
I discovered this while trying to do something with lazy evaluation:
log 'dummy message' do # ignores the 'message' value and always spits out 'dummy message'
message lazy { node.run_state[:dump_master_log_file] }
end
Chef Version
18.4.2
Platform Version
Ubuntu 20.04 LTS
Replication Case
The most minimal example I can think of would be:
log 'dummy message' do
message 'this is a much better message'
end
Expected output should be 'this is a much better message'
Client Output
log[dummy message] action write
Stacktrace
N/A
The text was updated successfully, but these errors were encountered:
Description
The 'log' resource, when used in a recipe, ignores the 'message' attribute and instead will use whatever the name of the log resource is as its message.
The following will always spit out "message"
I discovered this while trying to do something with lazy evaluation:
Chef Version
18.4.2
Platform Version
Ubuntu 20.04 LTS
Replication Case
The most minimal example I can think of would be:
Expected output should be 'this is a much better message'
Client Output
Stacktrace
N/A
The text was updated successfully, but these errors were encountered: