Logging to browser console

Hello, sorry if this is a basic question, but how do I create log entries that appear in the browser console (like pressing F12 in chrome)?


Hi! Do you want to log from Java or from Javascript? The latter one does “the trick” that knoobie said, but if you want to do it from Java, then you have to call the UI.getCurrent().getPage().executeJs(“console.log(…)”) method like this: https://vaadin.com/docs/v14/flow/browser/tutorial-execute-javascript

Thank you! I indeed wanted to log from java, so this is the answer I was looking for