core: Additional TRACE logging for EvalDeposeState

This is useful to get a read on which DeposedKey was generated to
correlate with other logs later in the output.
This commit is contained in:
Martin Atkins 2018-09-18 18:16:31 -07:00
parent cb13d0bb94
commit a63c408e84
1 changed files with 2 additions and 0 deletions

View File

@ -322,6 +322,7 @@ func (n *EvalDeposeState) Eval(ctx EvalContext) (interface{}, error) {
state := ctx.State()
key := state.DeposeResourceInstanceObject(absAddr)
log.Printf("[TRACE] EvalDeposeState: prior object for %s now deposed with key %s", absAddr, key)
if n.OutputKey != nil {
*n.OutputKey = key
@ -350,6 +351,7 @@ func (n *EvalUndeposeState) Eval(ctx EvalContext) (interface{}, error) {
state := ctx.State()
state.ForgetResourceInstanceDeposed(absAddr, *n.Key)
log.Printf("[TRACE] EvalDeposeState: %s deposed object %s is forgotten", absAddr, *n.Key)
return nil, nil
}