Not that @at_cleanup is used all that much but I've just noticed that using print will cause output to go ONLY to standard out process stream, not the node's console:
@at_cleanup
def cleanup_resources():
console.info("Cleaning up...")
_importantResource.close()
print "All cleaned up!"
After that node is recycled or shutdown, only the text Cleaning up... goes to the console. All cleaned up! ends up in the general standard out for that JVM process.
print normally strictly goes to the node's console.
Not that
@at_cleanup
is used all that much but I've just noticed that usingprint
will cause output to go ONLY to standard out process stream, not the node's console:After that node is recycled or shutdown, only the text
Cleaning up...
goes to the console.All cleaned up!
ends up in the general standard out for that JVM process.print
normally strictly goes to the node's console.