// Exit logs an exit from a function or code block
Exit logs an exit from a function or code block
// Exit logs an exit from a function or code block
func (rl *ResourceLogger) Exit(
	name string, 
	err error,
	additionalValues ...interface{},
) {
	if rl.log.V(1).Enabled() {
		depth := strings.Repeat("<", rl.blockDepth)
		msg := depth + " " + name
		if err != nil {
			additionalValues = append(additionalValues, "error")
			additionalValues = append(additionalValues, err)
		}
		vals := expandResourceFields(rl.res, additionalValues...)
		rl.log.V(1).Info(msg, vals...)
		rl.blockDepth--
	}
}
func ( rl * ResourceLogger ) Exit ( name string , err error , additionalValues ... interface { } , ) { if rl . log . V ( 1 ) . Enabled ( ) { depth := strings . Repeat ( " " , rl . blockDepth ) msg := depth + " " + name if err != nil { additionalValues = append ( additionalValues , " " ) additionalValues = append ( additionalValues , err ) } vals := expandResourceFields ( rl . res , additionalValues ... ) rl . log . V ( 1 ) . Info ( msg , vals ... ) rl . blockDepth -- } }
Exit logs an exit from a function or code block
Exit logs an exit from a function or code block
// name of the function or code block we're exiting