Hanna
Hanna

Reputation: 539

Console.log in a Java Back-end

I'm using Java with Spring Boot in IntelliJ Community edition. I usually use console.log() in the front-end to debug my code and see the value of a variable. Here in the back-end I try to do the same using System.out.println. For example

System.out.println("page is" + query.page());
return dslContext.select(...

I'm looking at the IntelliJ terminal but not getting anything back there.

Upvotes: 1

Views: 13618

Answers (1)

Francesco Vicidomini
Francesco Vicidomini

Reputation: 98

You can use the logger from java.util.logging.Logger

    private static final long serialVersionUID=1L;
    public static Logger logger=Logger.getLogger("global");
    //do some
    logger.info("page is"+query.page());

Upvotes: 3

Related Questions