Use something like syslog, where everything is recorded and you can filter on display by subsystem and loglevel.