R&D identified a 3rd party library (SuperSocket) which by default uses log4net as its logger, being the same Qlik default logger this is used and a null value is written. R&D is working on a fix.
Information provided on this defect is given as is at the time of documenting. For up to date information, please review the most recent Release Notes, or contact support at support.qlik.com with the ID QB- 3361 for reference.
Workaround:
A possible workaround is to change the table log_entries in the QLogs database to accept NULL values.
cd "C:\Program Files\Qlik\Sense\Repository\PostgreSQL\9.6\bin"
psql.exe -h localhost -U postgres -d QLogs -p 4432 -c "ALTER TABLE log_entries ALTER COLUMN payload DROP NOT NULL;"