Merge of (#10563) to Vaadin 7.

Use template strings and log level checks to improve performance when
logging is disabled.

Change-Id: I48d370f523c6361ce8704afc7a0903412b31b2a0