capture_message function

Captures Messages Preserving the Message Redirection