How and where to view the print console lines while running custom class or a plugin (either with calling a class of not)?
Although we don't recommend this approach, the print line will show in the KernelApplication.log file (/ServerKernel/logs/applicationlogs) when the custom class is executed.
We do recommend the following
service.getLogger().info("String to be printed");
This will show the output string in the process flow logs (when the logging level of the process flow is set to INFO).