PostgreSQL (10) show all NOTICE messages
You can change log_min_messages  to notice which will then write all notices to the server's log file. 

Note that a client can overwrite that setting any time, so it's not 100% reliable.