How to use Logger function

I create a test project to display logs on Ignition Server.
like this:


I read Ignition manual and than operate according to the manual

I create a button component and add this script below:

But the log didn’t display
How I can do this?

If you are doing this in a designer or client scope, it will log it to the local console. If it happens in a gateway context (gateway event script or tag script), it will log it to the gateway.

In addition to what @JordanCClark said, if you click the Log Viewer tab on your client Diagnostics window, you can all the logs. It’s convenient as in this spot your logs won’t be pushed out of the console by too many print / error statements.