if you deploy the .jar file on the application server, the System.out.print statement will not work (which means it will not be written to the log file).
For this you need to use log4j, which is built into Spring Boot.
Example:
final static Logger logger = LoggerFactory.getLogger (YourController.class);
logger.info ("Your print request");
Refer link
Satish kr
source share